KAMPALA, April 11 (Reuters) - Uganda, Tanzania and oil firms Total and CNOOC on Sunday signed agreements that will kickstart the construction of a $3.5 billion crude pipeline to help ship crude from fields in western Uganda to international markets.

France's Total and China's CNOOC own Uganda's oilfields after Britain's Tullow exited the country last year.

The signatories have now agreed to "to start investment in the construction of infrastructure that will produce and transport the crude oil," said Robert Kasande, permanent secretary at Uganda's ministry of energy.

Ugandan President Yoweri Museveni and Tanzania's new leader Samia Suluhu Hassan, on her first official visit, attended the signing of the three accords that included: a host government agreement for the pipeline, a tariff and transportation agreement and a shareholding agreement.

Uganda discovered crude reserves in the Albertine rift basin in the west of the country near the border with the Democratic Republic of Congo in 2006. Government geologists estimated total reserves at 6 billion barrels.

However, the landlocked east African nation needs a pipeline to transport the crude to international markets.

The planned East African Crude Oil Pipeline (EACOP), with a length of 1,445 kilometres (898 miles), will run from the oilfields to Tanzania's Indian Ocean seaport of Tanga.

Uganda's crude is highly viscous, which means it needs to be heated to be kept liquid enough to flow.

Total has said EACOP could potentially be the longest electrically heated crude oil pipeline in the world.

"It's a very large project, one of the largest we should develop on this continent," Total's CEO, Patrick Pouyanné said, adding they expected oil production to commence in early 2025.

To get the Ugandan crude flowing, Pouyanné said investments of more than $10 billion were required.

The pipeline has met resistance from environmentalists who argue it will threaten ecologically sensitive areas along its route, including wildlife reserves and water catchment areas for Lake Victoria.

About 263 non-governmental organisations (NGOs) from around the world have urged the chief executives of 25 banks not to extend loans to fund the pipeline.

The project, they say, would pose immense threats to local communities, water supplies, and biodiversity in Uganda, Tanzania, Democratic Republic of Congo and Kenya.

"This pipeline project can be a core of bigger deployments," said Museveni, adding investors could use the EACOP land corridor to put up another pipeline to ship gas from Tanzania and Mozambique to consumers in Uganda, Rwanda, Congo and other countries in the region.

(Reporting by Elias Biryabarema Editing by Gareth Jones; editing by David Evans)