Gregg Steinhafel, the chairman and CEO of Target during the retailer's massive breach of customer data last year, has left the company effective immediately.

The company announced that the decision was made after "extensive discussions" between Steinhafel and the board.

Chief Financial Officer John Mulligan will serve as interim CEO, while board member Roxanne Austin will serve as interim non-executive chair of the board. Company spokesman Dustee Jenkins said the board would look at both internal and external candidates for CEO, as well as candidates from outside of the retail industry. He said Mulligan is expected to return to the CFO post when the new CEO is named.

Steinhafel, 59, who had been with Target for 35 years, will serve in an advisory capacity during the transition to a permanent CEO. He started with the company as a merchandise trainee, and worked his way up through the company to be named CEO in 2008 and chairman in 2009.

Related: Target data breach - Where things stand

"Now is the right time for new leadership at Target," Steinhafel wrote in a letter to the board, saying the company is taking steps to recover from the problem.

The company just closed its fiscal first quarter last week, and will report results on May 21. Earnings could be hurt by ongoing customer concerns about shopping at Target. The company admitted that sales fell after it disclosed the hacking of customer data on Dec. 18. Analysts are forecasting a 12% drop in first quarter earnings, although they also expect a 2% rise in sales for February through April period.

Shares of Target (TGT) fell about 3% in trading Monday on the news.

Related: Chip-based credit cards coming to Target

The company has yet to report Steinhafel's pay for 2013 or this year, but he received $20.6 million in 2012, according to company filings. And a filing from a year ago put his estimated severance and termination package at $26.6 million.

The data breach, which exposed personal information of up to 110 million Target customers, is believed to be the largest such breach of any retailer.

Target admitted that news of the breach hurt it sales, and the company spent at least $61 million in the final months of 2013 responding to the hack. The event also led to a downgrade of the company's credit rating.

But the company's data breach is not the only problem Target has encountered over the last year. Steinhafel's resignation letter cited problems with the debut of the Target brand in Canada last year, where it opened 124 stores and lost $941 million.

Target is the No. 2 general retailer behind Wal-Mart Stores (WMT).

-- CNN's Poppy Harlow contributed to this report