NATIONAL CITY, Calif. (AP) _ Police who staked out a Pacific Bell telephone office for 31/2 hours and evacuated the area thought one or two masked gunmen were inside, but the SWAT team that stormed the building found it empty.

''I think everybody pretty well felt there was someone in there,'' said San Diego police Lt. Dave Spisak. ''I don't think anyone actually saw him leave.''

From 10:15 a.m. until nearly 1:45 p.m. on Monday, 35 officers and 18 members of a Special Weapons and Tactics team surrounded the small business, located in a shopping center in this town just south of San Diego.

They evacuated throngs of people from the shopping center, who jeered police lightly when they were allowed to return.

The episode began when a customer reported that a man or two men wearing rubber Halloween masks entered the back of the business, at which customers pay their Pacific Bell bills, and attempted to rob it. The robbery, Spisak said, was unsuccessful, although he was unsure why.

An employee reported seeing one man and ''a shadow of another'' go into an adjoining office in the business and lock the door, and feared that other employees had been taken hostage, Spisak said. The employee signaled to the customer to alert police.

No one ever saw a weapon, Spisak said.

Shortly before noon, 15 customers and three employees, who had been in the front office of the business when the incident occurred, were led from the building by police. The officers then moved into that part of the facility.

The SWAT team then prepared to storm the room in which it believed the masked man or men might be, but when the officers went inside they found no one there, and the detail was called off.