MOSCOW — The Foreign Ministry confirmed on Wednesday that Russian military advisers were in Syria, but it said that their presence was part of a longstanding agreement to provide military aid to the country.

Russian military aid to Syria has become a new source of tension between Washington and Moscow over the past few days, with the United States accusing Russia of escalating the conflict.

“Russian military specialists help Syrians master Russian hardware, and we can’t understand the anti-Russian hysteria about this,” said Maria V. Zakharova, a spokeswoman for the Foreign Ministry, adding that Russia had never made a secret of its cooperation with Syria over military technology.

“We have been supplying Syria with arms and military equipment for a long time,” she said. “We are doing this in accordance with existing contracts and in full accordance with international law.”