Barely audible above the din of schoolchildren enjoying their afternoon dip in the pool, Eric Sarpong – an engineer in the Ghanaian armed forces – explains why he loves swimming. It's not just a question of exercise, he says, but also focus, and it keeps him away from the more negative distractions that get some of his army colleagues into trouble.

"I come swimming three times a week, for two or three hours at a time," he says, blinking to get the chlorine out of his eyes as he dries off in the capital, Accra. "It helps me stay fit, and it stops me wasting time on certain other activities that are not good for you."

Sarpong enthuses about China, which, through state-run company Poly Technologies Inc (PTI), donated the sports complex to the armed forces in 2011.

As well as the Olympic-size pool, complete with sun loungers, there's a gym, with weights and cardio equipment, and a studio where soldiers and civilians mingle over step aerobics, the Tae Bo fitness system, a weight loss programme and African dance. There are tennis courts, seven-a-side football pitches, volleyball, beach volleyball and a restaurant run by the Southern Fried Chicken franchise.

China donated the sports complex to the armed forces in Ghana in 2011. It boasts an Olympic-size pool, gym and tennis courts. Photograph: Afua Hirsch for the Guardian

In recent years, the Chinese government has donated sports equipment elsewhere in Ghana. The country's ability to host the 2008 Africa Cup of Nations was given a huge boost by a $100m (£65m) soft loan from China for new stadiums, and construction is about to begin on a stadium in the colonial-era capital Cape Coast in central Ghana, for which China donated $30m.

"China has offered to build our new 15,000-capacity stadium at Cape Coast, without asking for anything in return," says Michael Frimpong, director of public relations for Ghana's ministry of sport.

"This is a major intervention in our sports sector by China," Frimpong adds. "It's a huge amount of money. The stadium will be used for football, but it will also have a gymnasium and other facilities to serve the people of Cape Coast."

Not everyone views China's gifts solely through the lens of friendship, though. PTI, for example, is one of China's top three arms manufacturers. It is a subsidiary of the state-controlled outfit China Poly Group Corporation, based in Beijing. Critics accuse PTI of exporting weapons to repressive regimes such as Burma and Zimbabwe, which paves the way for resource extraction by Chinese-owned firms.

And there is more to Ghana's relationship with PTI than treadmills and abdominal crunches. In 2011, a month before the new complex was completed, Ghana commissioned two 46-metre patrol vessels worth almost $40m from the company. Ghana has also entered into high-profile bilateral agreements with China such as a $10bn loan for infrastructure projects and a $3bn loan for its oil and gas sector. A source at the Chinese embassy said it had registered more than 300 Chinese companies that have opened an office in Ghana.

"China has a longstanding practice of offering package deals to countries in Africa," said David Shinn, professor of international affairs at George Washington University and co-author of China and Africa: A Century of Engagement.

"They include very large concessionary loans that must be paid back, frequently with raw materials. These loans are often used to construct large infrastructure projects tied to Chinese companies and sometimes a component of Chinese labour. It is not unusual to include grants in kind [which] very often come in the form of a stadium, government building, or sports complex."

Shinn adds: "In terms of the total package, the grants are usually a modest component and fall in the category of public relations. The idea is to garner good publicity for China."

Back at the sports complex, Sarpong says he is just grateful for the improvement in his quality of life.

"Before they built this place, the only place we could swim was the sea, and it is so rough, I couldn't swim much. Now I can really swim. It is very good that the Chinese did this for us."