DUBAI, May 31 (Reuters) - Saudi Aramco said on Wednesday it had signed a joint venture agreement with three firms to build a shipyard on the kingdom's east coast, part of the government's drive to diversify the economy beyond oil.

A shareholder agreement was signed with National Shipping Co of Saudi Arabia (Bahri) , a state-controlled firm which ships oil for Aramco, as well as London-listed Lamprell Plc,a United Arab Emirates-based engineering firm, and South Korea's Hyundai Heavy Industries Co.

Aramco, which announced a memorandum of understanding for the project in January 2016, gave no financial details of the joint venture.

It has previously said the project will cost over 20 billion riyals ($5.3 billion).

(Reporting by Andrew Torchia; editing by Jason Neely) ((andrew.torchia@thomsonreuters.com; +9715 6681 7277; Reuters Messaging: andrew.torchia.thomsonreuters.com@reuters.net))