Tanzania's President John Magufuli addresses a news conference during his official visit to Nairobi, Kenya October 31, 2016. REUTERS/Thomas Mukoya/File Photo

DAR ES SALAAM (Reuters) - Tanzania’s president, John Magufuli, has vowed to root out corruption in his ruling party, threatening “no mercy” for anyone giving or taking bribes.

Businesses have long said corruption and slow government bureaucracy were major obstacles to investing in Tanzania, which is ranked towards the bottom third of Transparency International’s 2015 index of least corrupt countries.

“Our party is among institutions accused of rampant corruption - this is not a secret,” Magufuli said late on Tuesday while addressing the Chama Cha Mapinduzi’s (CCM) highest decision-making body.

He said corruption was most rampant in Tanzania during elections and promised to “have no mercy on those who give or accept bribes”.

Saying ending party corruption was one of his priorities, Magufuli said he would reform the CCM, including helping it attain financial independence to avoid a reliance on campaign contributions from business executives.

CCM, which has ruled Tanzania for about 40 years, faced its strongest challenge yet in the 2015 election when a joint opposition presidential candidate got 40 percent of the votes, the highest share of ballots by an opposition candidate.

Some analysts have said CCM’s support has been declining due to economic hardships and growing public concern about corruption.

Nonetheless, Magufuli has drawn widespread praise from Tanzanians and other Africans for his aggressive anti-graft drive on a continent where a culture of venality runs deep and often hamstrings public services.

He has already dismissed several senior government officials, including the head of the government’s anti-graft body, the country’s top tax chief, a senior rail official and the head of the country’s port authority.