It was once billed as a model of socialist fraternity: South America's first high-speed train, powered by Chinese technology, crisscrossing Venezuela to bring development to its backwater plains. Now all but abandoned, it has become a symbol of economic collapse — and a strategic relationship gone adrift.

Where dozens of modern buildings once stood, cattle now graze on grass growing amid the rubble of the project's gutted and vandalized factory. A red arched sign in Chinese and Spanish is all that remains of what until 16 months ago was a bustling complex of 800 workers.

That's when the project's Chinese managers quietly cleared out.

As with many unfinished politically motivated projects dotting Venezuela — government critics call them "red elephants" — the decaying infrastructure contrasts with the railway's promising beginnings.

A decade ago then-President Hugo Chavez dreamed up the Tinaco-Anaco railway as a way to populate the plains and attract development from long-dominant coastal areas. Stretching 300 miles (468-kilometers), it was intended to move 5 million passengers and 9.8 million metric tons of cargo a year at speeds up to 135 miles (220 kilometers) per hour.

Chavez turned to China, one of his closest ideological allies, for engineering and financing for the project, part of a $7.5 billion deal that has made Venezuela the world's top recipient of Chinese loans. A consortium of state-run companies led by China Railway Group Ltd, the world's largest train maker, was tasked with carrying out construction.

But completion is four years overdue, and work, when it happens at all, has slowed to a crawl. At one barracks facility visited by The Associated Press, half a dozen workers huddled under the shade of a giant cement mixer, while two shirtless managers lounged at a control panel smoking cigarettes.

Nowhere are the project's declining fortunes more visible than in Zaraza, a sweltering crossroads town of 75,000 where what used to be an arena-sized factory churning out concrete railroad ties was located. In government news reels from 2013, the complex can be seen towering over manicured lawns and outdoor basketball courts where Chinese and Venezuelan workers socialized.

Shortly after the last Chinese managers left in January 2015, a mob of local residents — some of them armed — ransacked the site and hauled away everything of value. First to go were power generators, computers and air conditioners on the back of pick-up trucks. Vandals then tore apart dozens of buildings to scavenge for metal siding, copper wiring and ceramic tiles, some of which are now on sale at roadside stalls.

Jesus Eduardo Rodriguez, who owns and lives on the sprawling ranch where the factory was built, said the plundering lasted two weeks.

Several witnesses who declined to be named for fear of reprisals said the looting took place in plain view of National Guard troops, who they allege were on the take and working in collaboration with the town's pro-government mayor, Wilfredo Balza, which is why the incident never garnered media attention.

Balza did not return repeated phone calls and text messages seeking comment and was said to be unavailable when AP journalists visited City Hall.

"They destroyed everything," said Rodriguez, who eventually moved giant cinder blocks to cut off road access to the derelict property, which had become a haven for criminal gangs. "We just came to the house and almost cried, watching what they were doing."

E-mails to China Railway in Beijing went unanswered and the company didn't comment despite phone calls and two visits to its office in Caracas.

The factory's demise appears to have been triggered by Venezuela's cash crunch.

In a June 2013 interview with local television network Televen, the then-head of Venezuela's state rail authority acknowledged owing $400 million to the Chinese. Union leaders who for years complained of late salary payments say that has only multiplied as the economy spins further out of control. With foreign reserves at a 13-year low and inflation forecast to surpass 700 percent this year, Venezuela has fallen behind on payments to foreign enterprises from airlines to the service companies that extract the oil on which this OPEC nation's economy depends.

Until recently, China had been a lifeline for Venezuela. Since 2007 it bankrolled the administrations of Chavez, who died of cancer in 2013, and current President Nicolas Maduro with a mix of cash, loans and investment commitments totaling $65 billion, according to a database maintained by Boston University and the Inter-American Dialogue. Back when commodity prices were high and South America's economies booming, such deals in Venezuela and elsewhere in the region seemed a safe bet.

But lately, as China struggles with its own financial woes and the oil used as loan collateral has plunged in value, Venezuela is finding that kind of support harder to come by. A high-level mission to Beijing in February returned empty-handed.

Kevin Gallagher, a Boston University political scientist and the author of two books on China's economic ties to Latin America, said the Chinese are increasingly concerned about their exposure to an imploding Venezuela.

"Now the whole underbelly is falling out," said Gallagher, who was recently in Beijing gauging the state of the economic partnership. "The Chinese right now are completely panicked about risk."

This week senior U.S. intelligence officials, speaking on condition of anonymity because they weren't authorized to discuss their assessments by name, said that while China may be willing to ease repayment terms to help Venezuela stave off a meltdown, it is unwilling to provide any more financing to what they described as a bottomless rabbit hole.

Corruption may also be having a chilling effect. Six Venezuelan officials were arrested in 2013 and 2014 for allegedly embezzling $84 million from a Chinese development fund.

Outwardly, at least, there's no sign of concern.

"China pays high attention to the development of China-Venezuela relations and will continue maintaining the interactions between the two sides on all fields and at all levels to enhance mutual friendship and trust, promote mutually benefiting cooperation and promote mutual growth," China's Foreign Ministry said in a faxed response to questions.

But President Xi Jinping's government appears to be quietly hedging its bets. In addition to avoiding throwing good money after bad, they've quietly been courting a newly emboldened Venezuelan opposition that is trying to force Maduro's recall or resignation.

The contacts began at a meeting of the Socialist International, a worldwide network of left-leaning political parties, in New York last July attended by opposition Venezuelan politicians and members of the Chinese Communist Party, according to a Venezuelan participant who spoke on condition of anonymity so as not to jeopardize the relationship. The same politician then traveled to Beijing at the party's invitation to brief officials on the opposition's plans following its landslide victory in December's congressional elections.

China's ambassador has also dined privately with opposition leaders, the politician said, despite Venezuelan government warnings to foreign diplomats not to meet with individuals they accuse of trying to destabilize the country. Opposition leaders, who used to accuse China of acting as Maduro's enabler, have softened their criticism, sensing they'll need help digging Venezuela out of its economic hole if they rise to power.

The diplomatic dance means little to Omar Correa, who like many in Zaraza was captivated by the railway project's promise of progress. He still proudly wears the blue overalls emblazoned with the corporate logo of his former Chinese employees, only now he herds livestock amid the factory ruins.

"Are they going to come back?" a visibly stricken Correa asked. "I really hoped to see that train running one day."

___

Associated Press writers Jorge Rueda and Ricardo Nunes in Caracas, Venezuela, and Joe McDonald in Beijing contributed to this report.

___

Joshua Goodman is on Twitter at https://twitter.com/apjoshgoodman

His work can be found at http://bigstory.ap.org/journalist/joshua-goodman