Best Buy Co Inc beat quarterly profit and sales estimates as strong demand for mobile phones, calling plans and tablets offset weakness in its TV business, and its shares rose more than 4 percent.

The company, seen as a bellwether in consumer electronics, also cheered investors by buying back $505 million worth of common shares and backing its profit outlook for the year. It now sees sales at the high end of its $51 billion-$52.5 billion view.

The news came just months after the biggest U.S. consumer electronics chain decided to focus more on its mobile phone and online businesses and shrink its big-box format as investors raised concerns about its huge overhead costs and oversized stores at a time when many shoppers go online to buy gadgets.

The results also came the same day that the government said U.S. retail sales fell in May, the first drop in 11 months.

The topline was not as bad as people expected particularly given the continued weakness in the U.S. macroeconomic environment as well as the supply chain disruptions in Japan from the earthquake, Anthony Chukumba, an analyst with BB&T Capital Markets, said.

Best Buy's sales at stores open at least 14 months fell 1.7 percent, while analysts were looking for as much as a 4 percent decline. However, margins were much below analyst estimates.

This puts us back at the age-old question: Can Best Buy grow gross margin and comps simultaneously? The evidence remains unclear, JPMorgan analyst Christopher Horvers said.

Analysts said Best Buy discounted more to woo bargain-hungry shoppers from competitors, hurting margins.

They are fighting for share a little bit harder than they were (six months ago), RBC Capital Markets analyst Scot Ciccarelli said.

STRONG Q1

In the United States, demand was strong for mobile phones, tablets, eReaders, appliances and services, while sales of televisions continued to be weak. Outside its home turf, the retailer saw strong demand in China even as same-store sales fell in Europe and Canada.

The company said its first-quarter net profit was $136 million, or 35 cents a share, compared with $155 million, or 36 cents a share, a year earlier. Analysts on average were expecting a profit of 33 cents a share, according to Thomson Reuters I/B/E/S.

Sales rose 1.4 percent to $10.94 billion, beating the analysts average estimate of $10.71 billion.

The company's shares were up 4.4 percent at $30.09 in morning trading on the New York Stock Exchange.

Best Buy faces stiff competition from online retailer Amazon.com Inc and discounters Wal-Mart Stores Inc and Target Corp .

The retailer recently announced plans to boost its Web presence, shrink some larger stores and open more of its smaller U.S. stores.

Earlier on Tuesday, Carphone Warehouse , which owns 50 percent of a joint venture with Best Buy in Europe, said it has delayed a decision on the next steps for its loss-making UK consumer electronics megastores business until the autumn, mulling the wisdom of expanding as consumer demand slides.

(Reporting by Dhanya Skariachan; Additional reporting by James Davey in London, editing by Gerald E. McCormick, Dave Zimmerman)