By Lamine Chikhi

ALGIERS, Jan 27 (Reuters) - Algeria expects to increase exports of natural gas in 2017 as it looks to build on its top spot in sales to Spain last year and strong sales to Italy and Portugal, a source at state energy firm Sonatrach said.

Gas exports are expected to grow to 57 billion cubic metres (bcm) after sales of 54 bcm last year, the source said.

Algeria sold 20 bcm of gas to Spain last year, covering 55 percent of Spain's needs. It supplied 16 percent of Italy's demand and 15 percent of Portugal's, the source said.

Long a top supplier to Europe through pipelines and more recently though LNG, Algeria has seen its oil and gas output stagnate in recent years. Last year, however, it made progress in bolstering output.

Algeria's gas output in 2016 was 132.2 billion cubic meters, a rise from 128.3 bcm in 2015. It had fallen to 127.3 bcm in 2013, from 145.8 billion in 2010. Sonatrach now expects to produce 141 bcm in 2017, the source said.

Last year the European Union and Algerian energy officials held a summit where EU officials and energy companies urged Algeria to adapt to more competitive energy markets to allow more gas to flow north.

Sonatrach has taken a more flexible approach with foreign companies after several bidding rounds failed to attract new investment. The focus has shifted to improving existing field output and bringing online delayed projects.

"Boosting existing fields and new fields coming online this year will push output up," Sonatrach's CEO Amine Mazouzi said on Thursday on the sidelines of a conference.

Foreign energy firms remain wary of Algeria's contract terms and most shied away from the country's last two bidding rounds for new fields.

Lower global oil prices since mid-2014 have also slowed development.

Algeria, competing with U.S. LNG production and others, is boosting output to defend its market share in Europe. Most of Sonatrach's current long-term gas contracts with European customers begin expiring in 2019 and 2020.

(Editing by Patrick Markey, Jason Neely and Alexander Smith) ((pat.markey@thomsonreuters.com; +213-661-692993; Reuters Messaging: pat.markey.thomsonreuters.com@reuters.net))