A wildcat strike by transit workers paralyzed Boston's rush-hour traffic yesterday and stranded 300,000 commuters.

Union officials ordered an end to the strike last night about an hour after a judge ordered three union officers to jail. The union told the 3,200 striking transit workers to return to their jobs immediately.

The three union officials who had been held in contempt were not jailed but were freed after the union called off the work stoppage. Paul DiNatale, transit system spokesman, said service will resume early today.

State government and many businesses allowed workers to go home early yesterday to help ease evening traffic.

The members of the Boston Carmen's Union have been working without a contract for 16 months, but their walkout was touched off by animosity over the issue of part-time drivers.

The strike--the first here in four years--began without public warning. Many commuters did not learn of it until they got to their bus stops and subway stations.

Gov. Edward J. King described the strike as "an illegal and . . . truly outrageous action by the Carmen's Union." He activated the National Guard military police last night "to protect those who wish to return to work from any harassment."

James O'Leary, general manager of the transit system, had said he would seek fines against the union of $1 million a day, and warned that workers who stayed out risked suspension or dismissal.