ST. PETERSBURG, RUSSIA -- President Vladimir Putin warned Wednesday that Russia could provide long-range weapons to others to strike Western targets in response to NATO allies allowing Ukraine to use their arms to attack Russian territory.

Putin also reaffirmed Moscow鈥檚 readiness to use nuclear weapons if it sees a threat to its sovereignty.

The recent actions by the West will further undermine international security and could lead to 鈥渧ery serious problems,鈥 he said, taking questions from international journalists 鈥 something that has become extremely rare since Moscow sent troops into Ukraine.

"That would mark their direct involvement in the war against the Russian Federation, and we reserve the right to act the same way," Putin added.

The United States and Germany recently authorized Ukraine to hit some targets on Russian soil with the long-range weapons they are supplying to Kyiv.

On Wednesday, a Western official and a U.S. senator said Ukraine has used U.S. weapons to strike inside Russia under newly approved guidance from President Joe Biden. It allows American arms to be used for the limited purpose of defending Kharkiv, Ukraine's second-largest city. The official was not authorized to comment publicly on the sensitive matter and spoke on condition of anonymity.

Putin claimed that using some Western-supplied weapons involves military personnel of those countries controlling the missiles and selecting targets, and therefore he said Moscow could take 鈥渁symmetrical鈥 steps elsewhere in the world. The U.S. military said it does not control the missiles it provides to Ukraine or the targets.

鈥淚f they consider it possible to deliver such weapons to the combat zone to launch strikes on our territory and create problems for us, why don鈥檛 we have the right to supply weapons of the same type to some regions of the world where they can be used to launch strikes on sensitive facilities of the countries that do it to Russia?" he said.

"We will think about it,鈥 he told the journalists on the sidelines of the annual St. Petersburg International Economic Forum.

Putin speaks with international news agencies

Asked whether Russia could resort to using nuclear arms, Putin said the conditions for utilizing that arsenal are clearly spelled out in Moscow's security doctrine.

鈥淔or some reason, they believe in the West that Russia will never use it,鈥 he said.

鈥淟ook at what is written there,鈥 he said of Russia鈥檚 nuclear doctrine. 鈥淚f somebody鈥檚 actions threaten our sovereignty and territorial integrity, we consider it possible to use all means at our disposal.鈥

Even Russia's battlefield nuclear weapons are much more powerful than what the U.S. used against Japan in the Second World War.

Speaking to senior news leaders of international news agencies, including The Associated Press, for more than three hours, Putin also said nothing will change in terms of Russia-U.S. relations regardless of whether Biden or Donald Trump wins the American presidential election in November.

鈥淲e will work with any president the American people elect,鈥 Putin said.

"I say absolutely sincerely, I wouldn't say that we believe that after the election something will change on the Russian track in the American politics," he added. "We don't think so. We think nothing that serious will happen."

Putin also said Trump's felony conviction at his hush money trial last week was the result of "the use of the court system as part of the internal political struggle."

The Russian leader faced questions on various topics from senior news leaders of international news agencies, including TheAssociated Press, although the over two years of fighting in Ukraine dominated the session.

Putin claimed the West had opportunities to end the fighting in Ukraine but did not act on them, citing a letter he once supposedly wrote to Biden that said hostilities could end in two or three months if Washington stopped supplying Kyiv with weapons.

Asked about Russian military losses, Putin said that no country would reveal that information during hostilities but claimed without providing details that Ukraine's casualties are five times greater than Russia's.

He also said Ukraine has more than 1,300 Russian troops in captivity, while more than 6,400 Ukrainian soldiers are being held in Russia.

The claims could not be independently verified.

Asked by AP about the case of Wall Street Journal reporter Evan Gershkovich, Putin said the U.S. is 鈥渢aking energetic steps鈥 to secure his release. Gershkovich was jailed over a year ago while on a reporting trip and charged with espionage. The journalist, his employer and the U.S. have denied the allegations, and Washington has declared him to be wrongfully detained.

Putin said that any such releases 鈥渁ren鈥檛 decided via mass media鈥 but through a 鈥渄iscreet, calm and professional approach.鈥

鈥淎nd they certainly should be decided only on the basis of reciprocity,鈥 he added, an allusion to a potential prisoner swap.

Putin has used the St. Petersburg forum as a showcase for touting Russia鈥檚 development and seeking investors. While meetings with journalists were part of previous sessions, he has not taken questions from Western journalists at the St. Petersburg event since sending troops to Ukraine.

Last year, journalists from countries that Russia regards as unfriendly -- including the U.S., the U.K. and the European Union -- were not invited, and Western officials and investors also steered clear of the session after wide-ranging sanctions were imposed on Moscow over Ukraine.

-----

Associated Press writer Aamer Madhani in Washington contributed.