(CNN) -- A United Airlines flight was diverted to Toronto late Monday after the plane's communication system began to malfunction, an airline official said. Flight 940 never lost contact with air traffic control, according to United spokesman Rahsaan Johnson. The extent of the problem with the communication system wasn't immediately clear, but was bad enough the captain asked to divert, he said. The Boeing 777 was en route from Chicago to Frankfurt, Germany, with 255 passengers and crew aboard. It landed without incident at Pearson International Airport around 10 p.m., according to Sgt. Peter Riemenschneider with Peel Regional Police. The passengers were being kept in a gate area while a plane is sent to Canada to retrieve them and take them back to Chicago, Johnson said late Monday. They will be put on another plane to Frankfurt sometime Tuesday. CNN's Leslie Tripp contributed to this report.
NEW: Passengers will be taken back to Chicago, an airline spokesman says . The flight was en route from Chicago to Frankfurt, Germany . Plane's communication system began to malfunction, official says .