Activist investor Carl Icahn asked struggling retailer Family Dollar Stores Inc (FDO) to put itself up for sale immediately, threatening a proxy war to replace the company's entire board if a sale process was not started.

Icahn, who became Family Dollar's largest shareholder earlier this month, also asked that three of his representatives be added to the company's board immediately and be part of a new committee tasked with finding a buyer.

"Although we appreciated the cordial nature of our discussion at last night's dinner, it was apparent that we have a strong difference of opinion as to the future of our company," the billionaire said in a letter to Family Dollar's Chief Executive Howard Levine. 

Family Dollar's shares rose about 3 percent to $70 in extended trading, after closing at $68.14 on Thursday, valuing the company at about $7.77 billion.

Icahn said he believed the company would attract significant interest from strategic and financial buyers and that this was "a perfect time to sell, given the advantageous stock market and interest rate environment".

Family Dollar could not be immediately reached for comment.

"We believe the company has been in limbo for far too long," said Icahn, who has a 9.39 percent stake in Family Dollar, adding that he believed an overwhelming majority of the company's shareholders would favor a sale.

When he disclosed the stake, Icahn had said he was considering pushing Family Dollar to merge with rival Dollar General Corp (DG). He did not mention Dollar General or other possible buyers in his letter on Thursday.

After Icahn disclosed his stake, Family Dollar adopted a shareholder rights plan, also known as a "poison pill", with a trigger at 10 percent to buy time to consider any possible deal that Icahn could push for.

Family Dollar - which caters to lower-income shoppers, many living paycheck to paycheck - is struggling with falling sales. The company said in April that it would close 370 stores, slow its expansion of new stores and slash prices.

The company's stock has risen nearly 8 percent in the past year, well below the 20 percent rise in the S&P 500 index.

Icahn mentioned this in his letter, adding that Family Dollar has consistently underperformed its peers on most, if not all, operating metrics and faces growing competition.

Icahn warned he would approach shareholders directly by starting a written consent solicitation within the next few weeks if the company did not act immediately.

(Reporting by Soham Chatterjee in Bangalore; Editing by Savio D'Souza)