BRATISLAVA (Reuters) - The Slovak government said on Tuesday it had cancelled a referendum on NATO membership and selecting the president, recalled 28 ambassadors and granted amnesty to some prisoners. A spokesman for Prime Minister Vladimír Mečiar said the government was taking over some of the powers of the head of state after President Michal Kováč stepped down at the end of his five-year term on Monday leaving no successor. Deputy Prime Minister Sergej Kozlík. Kozlík was quoted by the opposition daily SME on Tuesday as saying the referendum called by Kováč for April 19 was illegal. Kováč called the plebiscite, which would have asked for the president in future to be elected by direct popular vote rather than picked by parliament as at present, in a bid to end the political impasse in the country over choosing his successor. Parliament is to vote on a successor to Kováč on Thursday, after a first ballot last month failed to reach agreement. The referendum would also have asked whether or not the country should join the North Atlantic Treaty Organisation. Slovakia was not invited to join the first wave of former Soviet Bloc countries to begin talks on joining NATO and the EU because of concerns about the country's democratic processes. NATO secretary general Javier Solana is due to visit Slovakia on Thursday. The government statement on Tuesday did not specify the categories of prisoners to be amnestied.