A 22-year-old Northwest Washington man carrying a toy submachine gun touched off an 80-minute standoff with police yesterday before surrendering in St. John's Church on Lafayette Square, D.C. police officials said.

They said the man was taken into custody inside the early-19th century Episcopal church--known as the Church of the Presidents--after a police barricade team surrounded the building and cordoned off several blocks around the park and the White House. President Reagan is vacationing on the West Coast and was not in the Executive Mansion at the time.

The man, who was not charged with a crime, was taken by police to St. Elizabeths Hospital for observation, according to 2nd District Detective Jack L. Stocks.

Police began receiving calls about 2:30 p.m. after a man, allegedly cradling what Stocks called a "very real-looking" toy submachine gun, walked into a fast-food restaurant at 16th and K streets NW, stayed a few minutes and walked out.

A few minutes later, police received calls from the Pan Am ticket office across the street, where employes said a man stood outside the front door showing the weapon, which resembled an Israeli-made Uzi, to passers-by.

By the time police arrived, witnesses said the man had entered the church. Police said six church employes went to the third floor to get away from the man. When the man refused to come out after repeated requests over police loudspeakers, police entered with drawn weapons. He offered no resistance, police said. Stocks said the man was carrying Army documents showing he had been discharged for mental disability from Fort Dix in New Jersey last month. Stocks said the man called the weapon his "toy" and said he had found it.