DUBAI, Sept 7 (Reuters) - Saudi Aramco, the kingdom's state oil giant, is talking to banks about raising a $5 billion loan related to a refinery it built in collaboration with China's Sinopec, three sources with knowledge of the matter said on Monday.

The funds raised from banks will be used to replace some of the capital Aramco invested to build the 400,000 barrel per day (bpd) refinery at Yanbu on the west coast of the kingdom, which can then be deployed in other projects.

Aramco did not immediately respond to a request for comment.

(Additional reporting by Reem Shamseddine in Khobar, editing by Louise Heavens) ((archana.narayanan@thomsonreuters.com; +971 445 36240; Reuters Messaging: archana.narayanan.thomsonreuters.com@reuters.net))