Two American members of the Church of Jesus Christ of Latter-day Saints who were detained in Russia for nearly three weeks have been released and are on their way home to the United States, a church spokesman said Wednesday.

Kole Brodowski, 20, and David Gaag, 19, were arrested on March 1 in Novorossiyk, 760 miles south of Moscow, during a meeting, said Eric Hawkins, a spokesman for the church.

David Gaag, 19, a Mormon missionary from North Bend, Washington, was returning home to America on Mar. 20, 2019. via Facebook

Brodowski, who was nearing the end of his two-year service, will return home to Garden Grove, California, while Gaag, who is from North Bend, Washington, "will return to the United States for a short time, receive any needed support, and then continue his service in a new mission," Hawkins said.

Kole Brodowski, 20, a Mormon missionary from Garden Grove, California, was returning home to America on Mar. 20, 2019. via Facebook

According to the Russian state agency Interfax, a court in the Krasnodar territory fined the men on March 15 and ruled to expel them on the grounds of "carrying out missionary work by a foreign citizen in violation of the requirements of the legislation on freedom of conscience, freedom of religion and religious associations."

Local law enforcement did not immediately respond to requests for comment.

Hawkins said that while in detention, the volunteers were "treated very well and maintained regular contact with their families and mission president."

Strict anti-terrorism regulations passed in 2016 limit the activity of religious groups in Russia. The church refers to its missionaries there as volunteers, Hawkins said.

"The church is closely monitoring conditions in Russia for all volunteers and will continue to fully comply with Russian law," he added.