Lawyer

A lawyer (also known as an attorney, advocate, or litigator) was a person who represented the interests of a person or group, for example, in a court of law. They also defended or prosecuted in Starfleet court martial cases. 

Lawyers serving in Starfleet may be assigned to the office of the Judge Advocate General. 

On Earth after a nuclear war circa 2079, lawyers were, for a time, abolished by execution. However, in the Federation, lawyers existed in the 23rd and 24th centuries.

Jean-Luc Picard, while involved in an arbitration regarding the Contract of Ardra, noted that his reputation as a litigator was at stake, as well as his "immortal soul". 

"Conservator" was the Cardassian equivalent of a criminal defense lawyer, although his role was actually not to acquit the accused but rather to prepare the accused to acknowledge and confess the crime(s) charged. The accused was also advised by a Nestor, who was an officer of, but not allowed to address, the Cardassian court. 

"Legal intercessor" was a possible Romulan equivalent of a lawyer. 

The Klingons termed their equivalent defending lawyers "Advocates". 

After Kay Eaton disagreed with her husband Julius' idea on what to do with Benny Russell's Deep Space Nine story, Herbert Rossoff told her "You tell him, Kay. I know a good divorce lawyer if you need one."

After he was arrested by Odo for smuggling kemacite, Quark told Rom to get him a lawyer. Rom suggested that he would contact Gaila for one. 

Starfleet officers of Commander rank or above could be called upon to serve as attorneys on an ad hoc basis in situations where no other legal staff was available or in matters involving personnel under their command. 

Cardassian

 * Kovat - conservator representing Miles O'Brien in 2370.
 * Odo - nestor representing Miles O'Brien in 2370.

Human

 * Samuel T. Cogley - defense counsel for James T. Kirk (and later, Ben Finney) in 2267.
 * Areel Shaw - prosecuted James T. Kirk in 2267.
 * Phillipa Louvois - prosecuted Jean-Luc Picard concerning the loss of the USS Stargazer in 2355; presided over a hearing to determine Data's legal rights in 2365.
 * Jean-Luc Picard - defense counsel for Data in 2365; arbitration counsel on behalf of the Ventaxian people in 2367.
 * William T. Riker - prosecuted Data on behalf of Bruce Maddox in 2365; defense counsel for Simon Tarses in 2367.
 * Benjamin Sisko - defense counsel for Jadzia Dax in 2369, and Worf in 2372.
 * Kathryn Janeway - represented The Doctor in 2377.

Klingon

 * Ch'Pok - prosecuted Worf in 2372.
 * Kolos - defended Jonathan Archer in 2152.
 * Orak - prosecuted Jonathan Archer in 2152.
 * Worf - defended James T. Kirk and Leonard McCoy in 2293.
 * Chang - prosecuted James T. Kirk and Leonard McCoy in 2293.

Vulcan

 * Tuvok - represented Quinn's asylum bid in 2372.