Morocco has recalled its ambassador from Nigeria, accusing the authorities there of using King Mohammed VI in an election campaign.
Its foreign ministry issued a statement, denying the king had spoken by phone to Nigeria's President Goodluck Jonathan, as had been stated by Nigeria.
The North Africa kingdom denounced such "unethical practices", it said.
Nigeria has denied that the king was being used to win over Muslim voters.
Mr Jonathan, a Christian from southern Nigeria, is facing a strong challenge in the 28 March elections from opposition candidate Muhammadu Buhari, who is popular in Nigeria's mainly Muslim north.
The Nigerian ministry of foreign affairs released a statement on Sunday, denying reports that President Jonathan had been snubbed by King Mohammed because he was trying to curry favour with Muslim voters.
"This information is absolutely not correct as the president did in fact speak to the Moroccan monarch... both leaders spoke extensively over the phone on matters of mutual interest and concern," it said.
However, Morocco's foreign ministry responded by saying it wanted to state in the "clearest and strongest terms" that "there has never been a phone conversation" between the two men.
"The king has actually declined the request of the Nigerian government because it is part of the internal electioneering," Morocco's official news agency Map quoted the statement as saying.
"The kingdom of Morocco expresses its astonishment and denunciation to these unethical practices that are contrary to the spirit of responsibility that must prevail in relations between states."
As a consequence Morocco's Abuja ambassador was being recalled immediately for consultations, it said.