BUDAPEST/LONDON, April 6 (Reuters) - Hungary said on Wednesday it was prepared to pay rubles for Russian gas, breaking ranks with the European Union which has sought a united front in opposing Moscow's demand for payment in the currency.

Hungary will pay for shipments in rubles if Russia asks it to, Prime Minister Viktor Orban told a news conference on Wednesday in reply to a Reuters question.

Russian President Vladimir Putin has warned Europe it risks having gas supplies cut unless it pays in rubles as he seeks retaliation over Western sanctions for Moscow's invasion of Ukraine.

With weeks go to before bills are due, the European Commission has said that those with contracts requiring payment in euros or dollars should stick to that.