Ericsson today posted a second quarter profit of $394 million despite curtailing LTE rollouts by major North American carriers. 

Revenue for the quarter came in at just over $8 billion, which beat analyst expectations. Gross margins also beat estimates and improved to 36.4 percent, up from 32.4 percent last year. Analysts has expected in the range of 35.6 percent.

In a press release, the Swedish equipment maker said sales in the quarter were mainly driven by continued capacity projects in North America and growth in the Middle East, China and India. 

The company also said that political unrest in parts of the Middle East and Africa has impacted sales in those areas. Ericsson said that uncertainty in Russia and Ukraine has had no negative impact on sales in the quarter.

Looking forward, Ericsson said that its modems business will start generating sales by the end of the year, as one of its modems will be featured in smartphones and data devices. 

Ericsson also said that a number of key contracts and a better business mix will lead to higher sales in the second half of the year. 

Shares of the Ericsson were up nearly 8 percent in early trading Friday to $12.63.