Democrat Cory Booker and Republican Lindsey Graham testified Thursday at the corruption trial of their Senate colleague Bob Menendez as defense attorneys made another attempt to halt the case before it goes to the jury.

The legal teams of Menendez and his co-defendant Salomon Melgen moved for a mistrial after U.S. District Court Judge William H. Walls on Thursday limited the testimony of one defense witness and effectively blocked another from taking the stand.

Melgen attorney Kirk Ogrosky called those rulings the “straw” that he said was just the latest in a series of decisions by Walls that have “precluded” the defense from putting on its case.

Walls all but denied the motion without making a formal ruling, which he said would come after both sides had a chance to submit written briefs.

“I frankly don’t think you have any merit for a mistrial based on judicial misconduct,” Walls said.

Menendez later said outside the courthouse he was "deeply disappointed that it came to the point that my lawyers had to make the motion they made today."

"I think that what they said in court stands for how I feel," Menendez said. "Their words stand for where we view things at this moment. But we will carry on."

He thanked Booker and Graham for telling the jury "who I really am" but did not answer a reporter who asked whether he would testify himself.

Praise for Bob

Booker and Graham appeared earlier in the day as character witnesses to vouch for Menendez’s honesty and trustworthiness. With defense attorneys set to wrap up their case next week, the senators' testimony could be some of the last jurors hear before they retreat to deliberate on the charges.

“One of the best things about politics for me the last four years is I get to work with Bob Menendez,” Booker, wearing a charcoal suit, light blue shirt and orange tie, said at the end of brief but emotional testimony.

“I don’t care who you are in America, Italian, Irish, Korean … black or Latino, you are not that far away from struggle and poverty and hurt,” Booker told jurors. “Some of us forget where we come from. But what I think is honorable about Bob and why he’s trustworthy is not because what he’s done for me, but because Bob has not forgotten where he comes from.”

Lindsey Graham, who represents South Carolina, preceded Booker on the stand, explaining that he worked with Menendez on the bipartisan “Gang of Eight” to try to craft a comprehensive immigration bill. The measure passed the Senate but eventually died in the House.

“It’s the most difficult politics I’ve been involved in. A lot of emotion. A lot of people are upset about our broken immigration system,” Graham said.

Asked by defense attorney Abbe Lowell if he often disagreed with Menendez on policy, Graham replied, “Like, most of the time.”

“[But] I’m not here because I agree or disagree with him. I’m here because I know him,” Graham said. “In very difficult circumstances, he always keeps his word.… A handshake’s all you need from Bob.”

Lead prosecutor Peter Koski had but one question for each man: Have you been at the trial the past eight weeks to hear the evidence presented to the jury?

“No, sir, I have not,” both answered.

The charges

The men appeared at the federal courthouse in Newark, where Menendez and his co-defendant have been fighting bribery and fraud charges since Sept. 6.

Prior to his testimony, Graham’s office released a statement saying that Graham traveled to the trial at his personal expense.

“He will testify about his service with Senator Menendez in the Senate,” his office said. “Graham’s testimony is unrelated to the underlying charges."

Menendez stands accused of using his office to help co-defendant Salomon Melgen, a wealthy Florida eye doctor and a longtime friend, to secure visas for his foreign girlfriends and to intervene in a lucrative port security contract in the Dominican Republic and a multimillion-dollar Medicare dispute.

In exchange, Menendez allegedly took bribes in the form of luxury vacations, free flights on Melgen’s private jets and more than $700,000 in political contributions.

Menendez has vigorously denied the charges, saying that he will be vindicated at trial and run for reelection next year.

Motion for a mistrial

Ogrosky opened about 90 minutes of oral arguments on the motion for a mistrial by pointing to the fact that the government has admitted more than 300 exhibits into evidence while the defense has admitted only 10. That imbalance, he said, was partly attributable to Walls wrongly deeming some evidence inadmissible.

“That scale of justice when we put evidence in or seek to put evidence in should be balanced,” Ogrosky said during a sometimes heated exchange with Walls.

“It depends on quality, not quantity,” Walls shot back, adding at another point: “We don’t just throw away rules [of evidence] because we are in a very important criminal matter.”

Ogrosky and Menendez attorney Abbe Lowell took particular issue with the judge’s decision to keep defense exhibits related to Medicare’s reimbursement policies out of the trial. Walls has ruled several times that such evidence would be repetitive on top of what jurors already heard, while defense attorneys maintain that it would help show Menendez’s motive and intent when he took certain actions.

In addition to raising concerns over evidence, the attorneys said Walls had inappropriately precluded some defense witnesses from taking the stand, limited the examination or cross-examination of other witnesses and instructed the jury on how to consider various matters only when defense attorneys were asking questions.

“Life is not fair and so too is judicial discretion,” Walls said.

Koski spoke only at the end of the arguments.

“We agree the motion is without merit both procedurally and substantively and should be denied,” he said.

Peer support

Booker, the junior senator from New Jersey, has been in court before as a spectator and has strongly defended Menendez outside of court. Booker left the courthouse Thursday without speaking to reporters.

Former Iowa Sen. Tom Harkin and former Health and Human Services Secretary Kathleen Sebelius took the stand as government witnesses earlier in the trial, but Booker and Graham are the first witnesses with national name recognition to appear on behalf of the defense.

NJ elections:Murphy leads Guadagno by 20 points, new poll says

Politics:Trump allows resumption of refugee program with 90-day review for some

Opinion:How Republicans can get everyone to stop blaming them

Menendez still appears to have support from many of his peers. Earlier this month, there were hints that Arizona Sen. John McCain, a Republican, might also take the stand for the New Jersey Democrat, but thus far that hasn’t come to pass.

When Menendez returned to the Senate in early October, he was greeted with a hug as he walked onto the Senate floor by McCain, who also worked with Menendez on the Gang of Eight.

National consequences

The trial has implications that extend well beyond Menendez and his political career. Should Menendez be convicted and pressured to resign or step down before Jan. 16, Republican New Jersey Gov. Chris Christie could appoint a replacement at a time when the Republican-controlled Senate is struggling to pass major legislation with a narrow majority.

Should Menendez relinquish his seat after Christie’s term expires, the winner of this year’s gubernatorial race will get to pick a successor. Democrat Phil Murphy is favored over Republican Lt. Gov. Kim Guadagno.

Meanwhile, prosecutors are trying to figure out how to win corruption cases after the U.S. Supreme Court last year restricted the reach of federal bribery laws.

Washington correspondent Herb Jackson contributed. Email: pugliese@northjersey.com and carrera@northjersey.com