MOSCOW -- Russia has ordered a Ukrainian diplomat to leave the country after allegedly receiving classified information from a database of the country's main security agency and Ukraine responded by expelling a Russian diplomat.

Alexander Sosonyuk, the Ukrainian consul in St. Petersburg, was detained Friday while meeting with a Russian in which he obtained material from a database of the Federal Security Service, according to the agency.

On Saturday, the Russian foreign ministry informed charge d'affaires Vasily Pokotilo that Sosonyuk must leave the country by Thursday. No details about the contents of the classified material were made public.

The Ukrainian foreign ministry later said it has ordered a senior diplomat to leave, but didn't identify the person.

The expulsions come amid escalating tensions over Russia's military buildup along the border with the eastern Ukraine region that is under the control of Russia-backed rebels.