LAS VEGAS — Nevada cattleman and state’s rights figure Cliven Bundy lost a courtroom bid to represent himself at his upcoming trial, after refusing Wednesday to recognize federal authority over grazing land at the center of a 2014 armed standoff with federal agents, his lawyer said.

U.S. Magistrate Judge Peggy Leen ruled after questioning the 71-year-old Bundy that he could not fire his attorney, Bret Whipple, even though Whipple filed court documents last week saying that Bundy dismissed him.

“I’m still on the case. We’re set for trial,” Whipple said following the ruling. “The court would not let him represent himself because he would not accept a court ruling that the land is owned by the federal government.”

Bundy remains in federal custody.

A spokeswoman for Acting U.S. Attorney Steven Myhre declined to comment about Leen’s ruling. Myhre is the prosecutor in the Bundy case.

Whipple said in court filings that his attorney-client relationship with Bundy stopped after Bundy demanded that Whipple withdraw from the case.

The attorney said Wednesday he was bound by legal ethics and court rules to represent his client’s wishes. He said he intended to appeal Leen’s ruling to the trial judge, Chief District Judge Gloria Navarro.

Bundy, two sons and four other defendants are due for trial Oct. 10 — including two defendants whose retrial ended last month with acquittal on most charges but who still face assault on a federal officer and weapon counts.

Bundy, sons Ryan and Ammon Bundy, and defendants Ryan Payne of Montana and Peter Santilli of Cincinnati are accused of leading a conspiracy to enlist a self-styled militia to prevent federal agents from removing Bundy cattle from what is now Gold Butte National Monument.

Cliven Bundy has long refused to recognize federal authority over public land where he said his family grazed cattle since the early 1900s.

The dispute echoes a nearly half-century fight over public lands involving ranchers in Nevada and the West, where the federal government controls vast expanses of land.