Two civil rights groups filed a lawsuit in federal court to stop the Massachusetts Bay Transportation Authority (search) from randomly inspecting passengers' bags, saying it's an unconstitutional violation of personal privacy.

A judge scheduled an emergency hearing for Tuesday in the case filed by the National Lawyers Guild (search) and the American Anti-Discrimination Committee (search).

The random inspections began Thursday, just in time for the Democratic National Convention this week at Boston's FleetCenter. The policy is the first of its kind in the country.

The groups say the searches violate the Fourth Amendment (search) because they don't require information that the person searched is suspected of criminal activity. They've urged customers not to consent to the searches.

"There is no way the MBTA can implement this policy in a constitutional manner," said National Lawyers Guild national president Michael Avery.

MBTA spokesman Joe Pesaturo said the bags aren't opened. Instead, they are run through a machine that detects explosives. Pesaturo said so far no one has objected to having their bags inspected.

"We are extremely confident that the policy will stand up to legal scrutiny," Pesaturo said.

The convention, which runs through Thursday, has prompted security precautions across the city, including daily helicopter patrols and Coast Guard searches of boats in Boston Harbor.

Pesaturo said MBTA official would assess the policy after the convention and decide whether to continue it.