Communist China has a love-hate relationship with the game of golf–building courses, shutting them down, and banning construction of new courses over the years. But when Chinese president Xi Jinping visited President Donald Trump at his Mar-a-Lago golf course estate in Florida this spring, the ball seems back in China’s court.

Although the two leaders did not hit the course, it was a symbolic moment.

“Xi often meets world leaders at golf courses—he met Barack Obama at Sunnylands in California in 2013, and in September he rode up front on a golf cart with Russia’s Vladimir Putin in Hangzhou in China,” Quartz Media reported in April.

“But he doesn’t play with them, a decision attributed to his crackdown on club membership freebies for party officials and the legacy of Mao Zedong, who called it a game for millionaires.”

These wild swings on its stand on golf dates way back to the late 1970s.

“It was January 1979, and President Jimmy Carter welcomed Chinese leader Deng Xiaoping on a historic trip to the United States,” NPR reported. “Deng came seeking U.S. help to open China’s economy, which had been ravaged by decades of Mao’s violent political campaigns.”

“But if American executives were to invest in China, they would need to travel there,” the NPR article stated. “And if they were to travel there, they would need a golf course.”

In Seattle, Carter introduced Deng to Robert Trent Jones Jr., the world’s top golf course architect.

“He brightened up and said, ‘I like sports!'” Jones said of his meeting with the Chinese leader. “He said, ‘What is golf?’ And I said, ‘It’s a small ball hit over a big field into a hole, and people gamble about it and they buy each other drinks.’

“He said, ‘Oh perfect, the Chinese will love it!’”

In 1989, Jones built the course at the Shanghai Country Club, but that love affair would not last forever.

Fast forward to 2004, when China banned the development of new golf courses, the Associated Press reported. At that time there were fewer than 200 courses in the country.

Now, in 2017, as a new crackdown on golf could be getting under way, there are more than 683 courses.

AP reported in January that the Chinese closed more than 100 courses, citing land and water conservation, and also forbade government officials to play on remaining courses where they could allegedly be corrupted.

“China has veered over the years between rejecting and supporting golf,” AP reported. “Amid a spirit of austerity and attacks on the country’s former elites, Mao Zedong banned golf after the founding of the People’s Republic of China in 1949.

“One Shanghai golf course was turned into the city zoo,” AP reported.

“As diffidence about golf in the upper reaches of the Communist Party lingers on, the game itself has become ever more acceptable in China,” Quartz media reported.

“The golfing industry certainly sees the country looking more hopeful for future growth than more longstanding golfing nations in Asia—such as Japan, where courses built during the 1980s bubble are now idle—as wealthy Chinese adopt it as part of a status-symbol-laden life.”

According to Quartz Media, “China’s cabinet included golf as among the sports to encourage in a statement it published in October about promoting the country’s leisure sports industry (sports apparel makers are already doing well as gym going becomes commonplace).”