(Adds comments by Armenia's Sarksyan in paragraphs 9,10,11)
By Lada Yevgrashina
BAKU, March 4 Azerbaijan's president said on Tuesday his country was ready to take back breakaway Nagorno-Karabakh by force if need be and was buying military equipment and arms in preparation.
President Ilham Aliyev linked his comments to the newly-declared independence in Kosovo which he said had emboldened ethnic Armenian separatists in Nagorno-Karabakh.
In a sign of disapproval of Kosovo's independence Azerbaijan's parliament later voted to withdraw a 33-strong Azeri peacekeeping team that has been serving there under NATO command since 1999.
Former Soviet Azerbaijan has been trying to restore control over Nagorno-Karabakh, where ethnic Armenian separatists threw off Azeri rule in the 1990s in a war that killed about 35,000 people.
"We have been buying military machinery, airplanes and ammunition to be ready to liberate the occupied territories, and we are ready to do this," Turan quoted Aliyev as saying.
He added the Nagorno-Karabakh conflict with neighbouring Armenia could be resolved only on the principle of Azerbaijan's territorial integrity.
The fragile peace between Azerbaijan and Armenia has held thanks to a ceasefire announced in May 1994 whan large-scale hostilities ended.
But as Aliyev spoke, local television channels reported that two Azeri soldiers died in an exchange of fire near Nagorno-Karabakh's border earlier on Tuesday.
Armenian Prime Minister Serzh Sarksyan, who will become the next president after winning a Feb. 19 election, blamed Azeri soldiers for attacking Armenian forces but said he hoped for a peaceful solution to the stand-off.
"I'm full of hope that normal and civilised logic will prevail in the end," he told reporters in the Armenian capital.
"The Nagorno-Karabakh conflict will be solved by peaceful means and I rule out a military solution to this conflict."
After mainly ethnic Albanian Kosovo declared independence from Serbia last month, Nagorno-Karabakh said this would help its own drive for international recognition.
The United States, major European Union powers and Azerbaijan's close ally Turkey have all backed Kosovo's independence, but Baku views it as illegal.
"You see how norms of international law are violated in the world," Aliyev was quoted as saying.
"And this has a negative impact on the settlement of the (Nagorno-Karabakh) conflict. The force factor remains decisive, and we will achieve this (Nagorno-Karabakh's reintegration)."
An Azeri official acknowledged that the pull-out of peacekeepers had clear political overtones due "to the changed political situation" after Kosovo's independence.
Azerbaijan's economy, propelled by windfall revenues from booming Caspian Sea oil exports, has shown double-digit growth, and Aliyev said the nation's $1.3 billion military budget was set to expand further in the years to come.
Aliyev said he believed Azerbaijan's growing military could nudge talks towards a diplomatic breakthrough. "A time will come when the Armenians will agree to that (settlement)," he said. (Additional reporting by James Kilner in Yerevan) (Reporting by Lada Yevgrashina; Writing by Dmitry Solovyov; Editing by Richard Balmforth)