In early 2268, Baris visited Deep Space Station K-7 to take charge of the development project on Sherman's Planet, responsible for the successful transfer of the grain quadrotriticale from Earth to Sherman's Planet.
Kirk was ordered by Starfleet Command to accommodate Baris, despite being angered at Baris' frivolous use of the alert for agriculture security, and imperious justification for it. Kirk endeavored to obey the letter of his request with a minimal effort to annoy him. That stormy relationship worsened during the stay with the stopover of a Klingon ship arrived at the station demanding shore leave privileges much to Baris' alarm and the rapid infestation of tribbles courtesy of a small-time trader, Cyrano Jones. Eventually, Kirk went out of his way to bait Baris at every turn, at one point threatening to hold him in irons if he did not shut up.
When the tribbles ate most of the grain, an outraged Baris vowed to put Kirk before a board of inquiry for both the mishap and Kirk's treatment of him. However, that move was preempted when a massive die-off of tribbles alerted the crew that the grain was poisoned. Furthermore, one of the tribbles revealed that Baris' assistant Arne Darvin was responsible as a Klingon spy. As a result, Baris satisfied himself with arresting Darvin. (TOS: "The Trouble with Tribbles"; DS9: "Trials and Tribble-ations")
Nilz Baris was played by actor William Schallert. The script for "Trials and Tribble-ations" spelled the name as "Barris".
According to David Gerrold's book The Trouble with Tribbles, Baris was originally named "Damon Jones" in his original premise for this story entitled, "The Fuzzies", which later evolved into "The Trouble with Tribbles." According to Gerrold, Jones was originally conceived as being "fairly sympathetic," which was rather contrary to Baris, which he described as "a pretentious, self-important bureaucrat."
In the original premise, Jones was worried that his grain was going to be sabotaged by a rival corporation, known as the "Barth Neo-Corn Corporation." To ensure the safety of the grain, the USS Enterprise was called in to protect it and make sure it reaches its destination, the planet "Barth."
After revising the original premise, based on suggestions by Gene L. Coon, "The Fuzzies" evolved into a script outline, entitled "A Fuzzie Thing Happened to Me...", and Jones evolved into "Nil Baris." According to that draft of the script, Baris was "a coarse, heavy-set man" who was "a raw-boned farmer turned businessman" with "an air of roughness about him that is very unpleasant."