(This June 5 story changes agricultural loan in paragraph 26 to reflect loan not taken, still being studied)

DOHA (Reuters) - Two years after flying in thousands of dairy cows to beat a trade embargo, Qatari milk producer Baladna has made its first exports.

Qatar is the world’s top liquefied natural gas exporter but a net importer of nearly everything else. The small but wealthy country has been under a trade and transport boycott by Saudi Arabia and its allies since June 2017 that has forced it to retool an economy once heavily reliant on fellow Gulf states.

Saudi Arabia, the United Arab Emirates, Bahrain and Egypt accuse Qatar of supporting Islamist terrorist groups. Doha denies this and says the boycott, which closed its only land border and disrupted shipping routes, is an attempt to infringe on its sovereignty.

Baladna received its first cows a month after the boycott and set up a huge diary farm. It says it now supplies more than half of Qatar’s fresh milk and is exporting to Afghanistan, Yemen and Oman, and soon to Libya.

Soon after the boycott was imposed, Doha developed new trade routes to replace its former Gulf partners. In late 2017 it opened a $7.4 billion port designed to become a regional transport hub.

Government officials say Baladna’s rapid expansion shows the embargo has made Qatar’s economy stronger. Their goal is to encourage local producers.

In April, Baladna rolled out a line of fruit juices. In Qatar’s supermarkets, brands like Mazzraty, which opened the country’s largest poultry plant in January, sit beside “Qatar Farms” displays of local fruit and vegetables.

Vegetable output is up about 20% since mid-2017 to around 66,000 tonnes per year and is expected to increase by 20,000-40,000 tonnes next year as new farms come online, said Sheikh Faleh Bin Naser Al Thani, an agriculture official at the Ministry of Municipality and Environment.

Qatar is now self-sufficient in dairy and fresh poultry. Before 2017 it produced only about 20% and 10% percent of its needs in those sectors, respectively.

“Qatar after June 5, 2017 is not like Qatar before,” said Baladna communications director Saba al-Fadala, referring to the start of the boycott. “We now don’t want or need anyone.”

Slideshow ( 15 images )

Schoolchildren tour the milking parlors of Baladna’s farm, where 20,000 cows live in vast air-conditioned sheds. The visitors learn how flying in cows restored milk supplies that had been trucked in before Saudi Arabia closed the border.

TAKING A HIT

But other sectors of Qatar’s economy have suffered, with real estate and retail taking a hit. Shopping malls and hotels once filled with Saudi and UAE tourists at times appear nearly abandoned. Property prices fell sharply amid a supply glut in the run-up to Qatar hosting the World Cup 2022.

In March, Qatar Airways reported its second straight annual loss. Barred from the airspace of countries imposing the boycott, the state-owned carrier has had to re-route many flights, increasing their duration and cost.

At the same time, the boycott has forced Qatar to mount a public relations drive in the United States and Europe to counter claims by rivals that it finances terrorism.

It has also adopted a lower profile in the region after losing many of the bets it placed during the 2011 Arab Spring in Syria, Libya, and Egypt, where Qatar backed Islamist groups such as the Muslim Brotherhood.

But with a national population of just over 320,000 and a $320 billion sovereign fund, Qatar is well-placed to weather the embargo, diplomats and analysts say.

“If you are going to be subject to a blockade, then you better have a lot of money,” one banker told Reuters.

In the early months of the crisis, Qatar liquidated nearly $3 billion in U.S. treasury investments and drew down over $40 billion in foreign reserves to support its currency and banks.

The economy has since stabilized, growing 2.2% year-on-year in the third quarter of 2018. Qatar’s banks have been replenished by foreign deposits replacing much of the Saudi and Emirati money that left, and its stock market was the top performer in the Middle East last year.

Slideshow ( 15 images )

Qatar’s goal of greater food self sufficiency has required launching agriculture on a commercial scale in one of the world’s harshest desert climates.

Nasser al-Khalaf, the managing director of Agrico, a produce grower and greenhouse manufacturer, says his business has boomed since he designed a system to keep fruit and vegetables cool enough to grow year-round.

In a polycarbon greenhouse, rows of ripening hydroponic tomatoes are cooled below 28 degrees Celsius as the temperature outside tops 40. Khalaf said the system allowed him to more than triple fruit and vegetable production to over 15 tonnes per day

Khalaf said his greenhouses are attracting investors looking at farming for the first time, drawn partly by increased subsidies for power, fertilizer and seeds since 2018.

“We never before saw businessmen investing in farms. They liked to invest in buildings and industry, anything but farms,” said Sheikh Faleh, the Qatari official.

Rabban Agriculture is one of the new entrants.

Owner Al Rabban Holding - with investments in property, transport and bottled water - is now considering initiatives including collateral-free loans from Qatari banks for agriculture projects, said deputy chairman Khalifa al-Rabban.

REFORMS AND OUTREACH

Qatari officials and diplomats said there was no sign of a let-up in the Gulf dispute, which has bolstered domestic support for 38-year-old ruler Emir Tamim bin Hamad Al Thani.

This has allowed him to accelerate reforms requested by Western allies that would have previously have faced local opposition, such as wider labor rights and a liberalized investment code for foreign ownership.

The reforms are intended to position Qatar as “like-minded with the Euro-U.S. community”, said a Western diplomat.

Doha pledged nearly $2 billion to expand Al-Udeid, the largest U.S. air base in the region. Qatar Petroleum aims to invest $20 billion in the United States, while the Qatar Investment Authority wants to expand its U.S. portfolio to $45 billion from $30 billion.

Nader Kabbani, director of research at Brookings Doha, said Qatar’s tone had changed from initially wanting to resolve the dispute to asserting it can go it alone.

Qatar can do that, said a Western diplomat, thanks to its gas wealth, World Cup exposure and international outreach efforts.