MOSCOW - President Vladimir Putin warned on 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’s 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 “very 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 that 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 “asymmetrical” steps elsewhere in the world. The U.S. military said it does not control the missiles it provides to Ukraine or the targets.

“If 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’t 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.

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.

“For some reason, they believe in the West that Russia will never use it,” he said.

“Look at what is written there,” he said of Russia’s nuclear doctrine. “If somebody’s 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 World War II, Putin said.

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.

“We 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, although the more than 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 and some Western estimates put Russia’s losses much higher than Ukraine’s.

Asked by AP about the case of Wall Street Journal reporter Evan Gershkovich, Putin said the U.S. is “taking 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 “aren’t decided via mass media” but through a “discreet, calm and professional approach.”

“And 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’s development and seeking investors. The meeting with journalists took place in Gazprom's new global headquarters, a needle-shaped 81-story skyscraper overlooking the Gulf of Finland.

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.