For 11 minutes on Thursday night, when President Trump’s Twitter account was unexpectedly disabled, Twitter went into panic mode.

At the company, customer service representatives, public relations managers and executives — including Twitter’s chief executive, Jack Dorsey — were bombarded by people asking what had happened to the president’s account, which Mr. Trump regularly uses as a megaphone for all manner of matters. No one had answers, according to current and former Twitter employees who were involved or briefed on the situation, and who spoke on the condition of anonymity because the details were private.

Mr. Trump’s Twitter account was quickly restored, but the internal scramble continued. Initially, Twitter executives believed the action had been an accident by an employee. Mr. Dorsey pushed for transparency, said one of the people with knowledge of the matter, and the company put out a statement to that effect.

Only after further review did executives discover that it was a contractor who was leaving Twitter that day who had disabled Mr. Trump’s account, said the people involved in the matter.