By Reem Shamseddine, Saeed Azhar and Tom Arnold

KHOBAR/DUBAI, March 28 (Reuters) - Citigroup C.N has formally applied for a licence to conduct capital markets business in Saudi Arabia, two sources familiar with the matter said, in a move to return to the country after an absence of nearly 13 years.

The application has been made with Saudi Arabia's Capital Market Authority (CMA), whose primary role is to regulate and develop the capital market in the oil-rich kingdom, the sources said.

Investment opportunities in the kingdom are opening up as the government diversifies its economy away from oil under its National Transformation Plan. The government is also preparing to list up to 5 percent of oil giant Saudi Aramco IPO-ARMO.SE in an initial public share offering that could raise as much as $100 billion.

Citi declined to comment on its Saudi plans. No one at the CMA was immediately available to comment.

Citi is "positive" that it will gain a licence this year, a third source said.

If successful, Citi could also pursue with the Saudi central bank permission for a full bank branch licence, potentially joining other banks such as JPMorgan JPM.N and Deutsche Bank DBKGn.DE .

After operating in the oil-rich kingdom for five decades, Citigroup pulled out of Saudi Arabia in 2004 when it sold its 20-percent stake in Samba Financial Group 1090.SE , saying then it was reallocating capital to core investments.

In 2015 it won permission from the Saudi Arabian regulator to invest directly in the local stock market, the first step towards returning to the country.

Citi had approached bankers about potential jobs in anticipation of the bank gaining a licence and building a team in the kingdom, one of the sources said.

Citi is not the only global bank looking to expand in Saudi Arabia. Credit Suisse CSGN.S is also seeking a banking licence, as it wants to build a fully-fledged onshore private banking business there, the bank told Reuters in an email in late February.

Goldman Sachs GS.N is also exploring the possibility of gaining a licence from the CMA to conduct share sales and trading in Saudi Arabia, a source briefed on the plan said.

The Wall Street bank has held preliminary talks with regulators, the source said. Bloomberg earlier reported Goldman's plans. Goldman declined to comment on that report. "Saudi Arabia has ambitious plans to establish industries and privatise companies led by the Aramco initial public offering, which attracts a lot of attention of banks," said Reinhold Leichtfuss, senior partner and managing director at The Boston Consulting Group's Middle East office. "Saudi Arabia is also the biggest market in the Gulf in terms of population and corporates so it makes sense for banks to be there."

There are 13 licensed foreign bank branches in the kingdom, including Deutsche Bank, BNP Paribas BNPP.PA , JPMorgan Chase and Industrial and Commercial Bank of China 601398.SS , according to the central bank's website.

Citi chief executive Michael Corbat met with Saudi Arabia's Deputy Crown Prince Mohammed bin Salman earlier this month on a visit to the kingdom, in addition to Saudi billionaire Prince Alwaleed bin Talal Al Saud, a shareholder in the bank.

(Reporting by Reem Shamseddine in Khobar, Saeed Azhar and Tom Arnold in Dubai; Additional reporting by Marwa Rashad in Riyadh; Editing by Mark Potter) ((Saeed.Azhar@thomsonreuters.com; +65-64035664 ; Reuters Messaging: saeed.azhar.reuters.com@reuters.net))