Embattled Lakers coach Mike D’Antoni has resigned after two seasons with the team, the Lakers announced Wednesday.

D’Antoni had one more guaranteed year at $4 million but was dismayed when the Lakers declined to pick up his option for the 2015-16 season at another $4 million.

The Lakers went 27-55 last season, setting the franchise record for most losses.

Kobe Bryant and Pau Gasol disliked D'Antoni's small-ball approach, leading to big-picture trouble for him.

D’Antoni and his agent, Warren LeGarie, pushed the Lakers to pick up his option year to add stability to his tenure. It didn’t happen.

“In order for Mike to have done his job, we felt that having the option year picked up would have changed the narrative,” LeGarie said Wednesday. “They knew that Mike would have been the coach and there would have been a different reaction. It would have been difficult for him to do his job without it.”

D’Antoni was hired 10 games into the 2012-13 season after coach Mike Brown was abruptly fired. The Lakers made the playoffs last season, but were swept in the first round by San Antonio as Bryant watched from the sideline because of a torn Achilles’ tendon.

Bryant played only six games this season but joined forces with Gasol as critics of D’Antoni’s system. Gasol openly criticized it, leading to some tense exchanges through the media between Gasol and D’Antoni.

Despite it all, D’Antoni was unsure about resigning until Wednesday. He was paid an undisclosed amount of the $4 million he was owed for next season.

“It was an impossible decision for Mike,” LeGarie said. “He loved the guys on the team, the young guys. He clearly felt he had impacted their development and they had a real good buy-in on this. But clearly there wasn’t enough there to get us past some of the issues.”

It was not immediately clear who the Lakers had on their short list as replacements for D'Antoni.

[Updated 7:04 p.m. PDT April 30: Lakers great Magic Johnson posted on Twitter that he was pleased about D'Antoni resigning: "Happy days are here again! Mike D'Antoni resigns as the Lakers coach. I couldn't be happier!"

Lakers General Manager Mitch Kupchak thanked D'Antoni for his efforts in a statement released by the team:

“Given the circumstances, I don’t know that anybody could have done a better job than Mike did the past two seasons,” Kupchak said. “On behalf of the Lakers, we thank Mike for the work ethic, professionalism and positive attitude that he brought to the team every day. We wish him the best of luck.”]

ALSO:

California Chrome wins the 140th Kentucky Derby

Clippers' Chris Paul knows there is no time for injuries

Floyd Mayweather Jr. prevails in close fight with Marcos Maidana