At least 18 people were killed when a large tree fell into the pool they were swimming in at the base of a waterfall in Ghana, police said on Monday.

The waterfall, near the town of Kintampo, was busy with weekend visitors, many of them high school students, when the accident happened on Sunday.

Desmond Owusu Boampong, a local police commander, told Reuters news agency that 20 more people were being treated in a hospital. Another police commander said 22 were injured.

My heart goes out to the families killed in the #Kintampo waterfall accident. Terrible disaster. #Ghana pic.twitter.com/5tdnXSld9x — Benjamin Tetteh (@benjieluv) March 20, 2017

"It was the upper part of one of the biggest trees that came crashing down on them. It was a horrifying scene as the area was engulfed in screams and shouts for help as we arrived," firefighter Kwaku Boateng said.

"It was a difficult operation because ... some untrained members of the public joined in a desperate attempt to help. We swung into action immediately with many of our men diving into the water. We used chainsaws and other cutting tools to chop the tree in pieces in order to free the victims," he said.

Pictures in local media showed thick branches lying in a pool at the base of the waterfall.

Other photographs showed bodies, some wearing bathing suits, placed in rows on the ground or piled into pick-up trucks.

@Gidi_Traffic 20 students have died after trees fell on them at Kintampo waterfalls, a popular waterfall in Ghana,while they were swimming pic.twitter.com/adLd2jTogh — AustynZOGS (@Austynzogs) March 20, 2017

The disaster occurred not long after a rainstorm in the area located in Ghana's middle belt Brong Ahafo region, which is known for heavy rains at this time of year.

Ghana's Tourism Minister Catherine Afeku, heading to the scene to meet families of victims, said an investigation would be conducted.

President Nana Akufo-Addo sent his condolences via his official Twitter feed.

I have learnt with great sadness, the unfortunate incident that occurred at Kintampo Waterfalls yesterday. (1/2) — Nana Akufo-Addo (@NAkufoAddo) March 20, 2017