Image copyright AP Image caption A former Saturday Night Live regular, Tracy Morgan's role in 30 Rock earned him an Emmy nomination

Former 30 Rock star Tracy Morgan has been discharged from hospital, five weeks after being badly hurt in a car crash that left a fellow comedian dead.

The comedian will continue his recovery at home with an "aggressive outpatient program," said spokesman Lewis Kay.

"He asked me to pass along his sincerest gratitude to everyone who has helped him get to this point."

Morgan's legs, nose and ribs were broken on 7 June when a Walmart truck crashed into his vehicle in New York.

The wreck killed comedian James McNair, who went by the stage name Jimmy Mack.

Morgan's assistant, Jeffrey Millea and comedian Ardie Fuqua Jr were also injured in the crash.

Driver 'was speeding'

On Thursday, Morgan's lawyers sued Walmart for negligence, claiming the retailer should have known that its driver had been awake for more than 24 hours, and that a 700-mile commute from his home in Georgia to work in Delaware was "unreasonable".

"As a result of Wal-Mart's gross, reckless, wilful, wanton, and intentional conduct, it should be appropriately punished with the imposition of punitive damages," court papers said.

The truck driver has separately pleaded not guilty to charges of death by auto and assault by auto charges.

Prosecutors said Kevin Roper had not slept for more than 24 hours before the crash on the New Jersey Turnpike, when he swerved to avoid traffic that had slowed down, ploughing into Morgan's limo bus.

A report by the National Transportation Safety Board, said Mr Roper had been driving at 65mph in a 45mph construction zone shortly before the crash.

He had been on the clock for 13-and-a-half hours at the time of the crash, the report concluded. Federal rules permit truck drivers to work up to 14 hours a day, with a maximum of 11 hours behind the wheel.

Image copyright AP Image caption Truck driver Kevin Roper faces more than a decade in prison if convicted

In a statement issued Saturday, Wal-Mart said it was "cooperating fully" in the ongoing investigation.

"We know it will take some time to resolve all of the remaining issues as a result of the accident, but we're committed to doing the right thing for all involved," the retailer said.

Morgan was a series regular on Saturday Night Live for seven years and earned an Emmy nomination for best supporting actor for his role in the sitcom 30 Rock, in which he starred alongside Tina Fey and Alec Baldwin.

He was returning from a stand-up performance in Delaware when the crash occurred last month.