Sen. Robert Menendez once threatened the State Dept. with a senate hearing if it failed to act on an international contract dispute that, if resolved, would financially benefit his wealthy West Palm Beach pal, it emerged at his bribery trial Tuesday.

Democratic Senator Robert Menendez threatened the hearing during a March 2012 meeting with State Dept. officials, according to testimony by State Dept. employee Mark Wells.

Wells was not at the meeting, but he took the stand Tuesday to read emails he received afterward about the meeting between Menendez and Bill Brownfield, who was then assistant secretary of state.

“The senator noted displeasure very clearly with current state of affairs and threatened to hold a hearing on the matter if we don’t meet his deadline,” read an email from State Dept. official Todd Levett that CCed Brownfield.

The email warned that Menendez wanted action on his friend’s business interest by July 1.

Menendez called the meeting over a contract dispute his pal, Dr. Salomon Melgen, was having with the Dominican Republic over his port security business, ICSSI, the feds said.

If resolved with the help of the State Dept., Melgen stood to make upward of $100 million on the deal the feds have said.

The government claims Menendez used the power of his office to help his rich doctor pal, Salomon Melgen, with his personal and business affairs in exchange for free private jet flights, campaign contributions and all-expense-paid vacations.

Menendez and Melgen argue that any gifts and favors exchanged were the result of their decades-long friendship — not bribes.​