* In Amenas output down since 2013 militant attack

* Third gas train in test production last week

* Output to increase as EU, Algeria talk energy

(Adds details on production, background)

By Lamine Chikhi

ALGIERS, May 25 (Reuters) - Algeria's In Amenas gas processing plant started test production at its third train a week ago and will soon be back running at full capacity, more than three years after a militant attack, a source at state energy firm Sonatrach said on Wednesday.

The plant's second train is in scheduled maintenance, but In Amenas should be back to its full 9 billion cubic metres (bcm) annual production capacity by late June for the first time since the 2013 attack that killed 40 oil workers and hit output.

The return to production at In Amenas, which supplied around 11.5 percent of Algeria's total natural gas output before the attack, comes as Algeria and the European Union are in talks about improving energy cooperation to diversify E.U. supplies.

"Test production has been launched successfully, and the official opening is expected very shortly," a top Sonatrach source, who asked not to be named, told Reuters.

"In the third week of June the plant will come back to full production at 9 billion cubic metre per year."

In Amenas is operated by BP BP.L , Statoil and Sonatrach. Sonatrach engineers have been managing the plant since BP and Statoil pulled out workers following a rocket attack in March on the Krechba gasfield.

European Union officials and industry representatives attending a business forum in Algiers on Tuesday urged Algeria to adapt to more competitive markets and attract the investment needed to pump more gas north again after years of sliding exports.

Algeria is seen as a natural source of gas supplies for the European Union after the Ukraine conflict underlined the risks of relying too much on the bloc's top gas supplier, Russia.

While the North African country is the EU's third biggest gas supplier behind Russia and Norway, its export capacity through three pipelines and LNG shipments across the Mediterranean Sea is underused.

Algeria's government hopes dozens of projects, mostly in its southwestern Sahara will generate new production and help keep its flow of gas to Europe stable in the medium term. But it has failed to attract the investment needed to discover and develop new fields and maintain old ones.

(Writing by Patrick Markey; Editing by Greg Mahlich) ((pat.markey@thomsonreuters.com; +213-661-692993; Reuters Messaging: pat.markey.thomsonreuters.com@reuters.net))