The Minnesota Timberwolves and star forward Kevin Love have agreed to a four-year contract extension worth between $60 million and $62 million, beating Wednesday’s midnight ET deadline.

Love had originally sought a five-year deal but backed off that request and instead insisted that the final year of a four-year deal would be at his option.

Sources close to the process told that the All-Star forward was determined to have the ability to opt out and become an unrestricted free agent after three seasons if he didn’t like the direction of the team.

That means Love will have the right to become an unrestricted free agent in summer 2015 if the Timberwolves, who haven’t made the playoffs since 2003-04 and are last in the Northwest Division, don’t become a consistent winner.

Love said Timberwolves owner Glen Taylor and president of basketball operations David Kahn did not want to offer the five-year deal to the All-Star power forward.

“Did I want the five years? Of course,” Love said on a conference call from Dallas, where the Timberwolves were scheduled to play the Mavericks on Wednesday night. “It was something I felt strongly about, but at the end of the day, a four-year deal is still great.”

“I like the direction the team is headed,” Love said. “I like the youth. I like the pieces, like we’re knocking at the door and we’re close in a lot of games.”

Before the deal was announced, a post on Love’s verified Twitter page hinted that it was all but complete: “To #twolves fans: I’ll be in Minnesota for 4 more years! Excited to see you when I get back to Minneapolis.”

Love was eligible for the same five-year, $80 million extension that the Oklahoma City Thunder awarded guard Russell Westbrook last week.

But the Wolves, sources said, refused all month to budge on their offer and give Love a fifth year, which would have made him Minnesota’s “designated player.” Based on the NBA’s new collective bargaining agreement, every team is allowed to have one “designated player” who receives a five-year maximum extension on his rookie contract.

Because of the team’s stance, Love and agent Jeff Schwartz insisted that the final year of a four-year deal would be at the All-Star forward’s option.

As the clock neared the deadline, Love said the situation was weighing on him and he wondered if the deal would get done.

“I was willing to make a commitment for five years. They thought otherwise,” he said. “I’m glad this is out of the way. It was drawn out until 8 a.m., 9 a.m. this morning.”

Love played through illness Monday night against Houston and totaled 39 points and 12 rebounds. He’s averaging 24.9 points and 13.9 rebounds through 17 games this season after last year becoming the first player since Moses Malone in 1982-83 to average 20 points and 15 rebounds for an entire season.

Love, the son of a former NBA player and nephew of Beach Boys member Mike Love, was a high school star in Oregon, an All-American in his only season at UCLA and last year led the NBA in rebounding. He became the first player in more than two decades to have 30 rebounds and 30 points in the same game and became an All-Star in just his third season as a pro.

The four-year deal gives the Timberwolves some flexibility going forward and keeps that maximum offer available for point guard Ricky Rubio, No. 2 overall pick Derrick Williams or another player down the road.

“It’s good to have our centerpiece,” Williams said. “We need a guy like him to put up 25 and 10 every night. … I had a feeling he would stay with the fan base he’s built.”