Earlier in the day, Russian Federal Security Service (FSB) investigators asked the Lefortovo District Court of Moscow to arrest the journalist.
"The court granted the petition of the investigation and chose a a measure of restraint for Gershkovich in the form of detention until May 29," the court said.
Earlier in the day, the FSB said that Gershkovich was detained in Yekaterinburg on a suspicion of espionage for the US. On instructions from Washington, Gershkovich collected classified information about the activities of one of Russian military-industrial complex firms, the FSB said. He was detained in Yekaterinburg while trying to obtain secret information.
Commenting on the Gershkovich's detention Kremlin Spokesman Dmitry Peskov said earlier in the day that the journalist was caught red-handed.
"The only thing I can say is that, as far as we know, he was caught red-handed," Peskov told reporters when asked if Moscow will cooperate with the US intelligence services on the matter.
Commenting on a possible response measure by the US, the official expressed the hope that there will be no reaction.
"We hope that this will not happen and this should not happen because once again I repeat it is not about suspicions, it is about the fact that he was caught red-handed," he said.
Additionally, he said that employees of the WSJ Moscow bureau can continue to work if they are accredited.