The union representing Pan American World Airways mechanics, baggage handlers and food service workers declared a strike against the airline shortly after midnight this morning.

John Kerrigan, director of Transport Workers Union's Airline Division, which represents 5,700 Pan Am mechanics, baggage handlers and food service workers, said earlier yesterday that a new offer, made yesterday morning, was not good enough to forestall the strike.

Mike Bakalo, a vice president of the TWU, said that the company offered a 20 percent raise over 36 months: 5 percent on April 1; 5 percent on Nov. 1; 5 percent in 1986 and 5 percent in 1987. The company also offered a $1,200 immediate bonus for mechanics and a $900 bonus for fleet service workers.

The union is asking a 38.5 percent increase over a three-year contract.

The central issue, Kerrigan said, was a 14 percent "snapback" owed to union members from previous contracts that the union had agreed not to take in the past to help the company avoid bankruptcy. The snapback came due Jan. 1. Pan Am tried to renege on it, but a federal judge in Manhattan ordered the company to pay the increase beginning this week and retroactive to Jan. 1. The company has appealed the ruling, but no stay has been issued.

Pan Am said that it plans to continue flying key flights even if there is a strike. An assessment by various union officials and members is that even without the support of other unions, the loss of the TWU members' services would bring the airline to a halt in a matter of days.

But the other four Pan Am employes unions, including the Air Line Pilots Association, have publicly pledged support of the TWU in a strike. With all or most of the 19,000 unionized workers staying off the job, the airline would be hard-pressed to operate anything other than a few flights.