A district court has rejected a suit filed by more than 1,000 people aimed at preventing Japan from concluding the Trans-Pacific Partnership agreement.

The plaintiffs, including farmers and medical workers, says the free trade pact undermines basic human rights and is unconstitutional. But the Tokyo District Court ruled that the decision to conclude a treaty lies within the realm of executive power and cannot be halted by a civil lawsuit.

"It merely hurts the personal feelings of the plaintiffs who are opposed to the TPP and cannot be said that a specific right has been infringed on," Presiding Judge Satomi Nakamura said.

The plaintiffs said joining the TPP framework will jeopardize Japanese food safety through deregulation and push up the price of medicines.

Twelve countries including Japan and the United States reached a broad agreement on the TPP in October 2015 and signed it in February 2016.

The U.S., however, announced its withdrawal from the deal after President Donald Trump took office in January 2017, making it uncertain whether the pact will actually take effect.

The government's TPP headquarters said it believes its claims have been understood by the court.