It was a sunny day in July when Marvin Stewart drove into Washington from California to do battle with the Coast Guard about his military discharge.

Like hundreds of people before him, Stewart, 28, was in town to correct what he saw as a wrong delivered by the hand of an insensitive bureaucracy.

But Stewart was different from most. He won.

Yesterday -- nearly 100 days, thousands of phone calls in innumerable hassles later -- Stewart had what he wanted: an honorable discharge, a U.S. Treasury check for $6,052.14 in back pay and a tacit admission of error by the government.

In the process, Stewart ran up nearly $1,000 in motel bills, exhausted his savings and was forced to do odd jobs to keep his little crusade in gear. He helped set up grandstands for the visit of the pope, for example.

Eight years after his troubles with the Coast Guard began, Stewart has memorized the dates and sequence of every scrap of his correspondence with a long line of government officials -- including some at the White House -- in his effort to clear his name.

An enlisted man in the boatswain's crew aboard the Coast Guard icebreaker Glacier, Stewart was accused in 1971 of taking part in an arson incident on the vessel's helicopter deck in port in Long Beach, Calif.

For Stewart, one of 10 blacks in a crew of 250, the fire was the worst in a string of episodes aboard ship. He had been disciplined several times for scrapes that had a racial tinge.

Shortly after the fire, while the ship was at sea off Alaska, Stewart was flown back to California and spent the next 75 days in maximum security detention at the El Toro Marine Base south of Los Angeles. At his courtmartial, he was acquitted of the arson charge, but the Coast Guard had had enough of Marvin Stewart.

He was given a general discharge, a status reserved for those who leave the service under a cloud, and immediately separated from duty. "The court-martial adjourned at 10:45 a.m. and at 1 o'clock I was out," Stewart recalls.

Stewart's record, with coded notations indicating he was apathetic and had a bad attitude, was filed away by the Coast Guard. Attached to it was a security dossier containing an FBI investigative report of the arson.

He moved to Shreveport, La., to join his brother and start his life over. "I got married, I went to school, bought a home," he said.

But his experience on the Glacier dogged him. The telephone company in Shreveport refused to hire him after checking his military record. He lost a job with the Kansas City Southern Railroad when his employer, believing he was classified as a security problem, fired him.

"It was affecting every part of my life . . . it was becoming an emergency for me to get an upgraded discharge," Stewart said. His marriage fell apart because he was unable to hold a job.

"I started to lie about my military record," he said.

In 1976, he went home to California, and, with the encouragement of Geralding Green, a Los Angeles attorney who volunteers time to the NAACP, filed an application to the Department of Transportation's Board of Correction of Military Records seeking relief.

He also wrote letters to anyone who could possibly help. President Carter heard from Marvin Stewart, as did Sen. Alan Cranston (D-Calif.) and his congressman, Augustus Hawkins.

When he was notified his case was coming up for review, Stewart packed up his car and drove to Washington.

"They said it would take three to six weeks so I brought money for eight," he said. "However, the matter took somewhat longer than anticipated." e

Installing himself at first at the Key Bridge Marriott, Stewart began to make rounds at the legal counsel's office at Transportation to be sure he wasn't forgotten." "I kept hearing excuses," he said. "I was getting the runaround. They would say to me, 'We have meetings; such-and-such a person is sick: he's on vacation.'"

Undaunted, Stewart decided to attract still more attention to his case. In what he describes as an effort "to shake their [the government's] nest a little bit, Stewart appeared on WJLA-TVs "Speakout" program. Stewart's television spiel began: "In the interest of justice, I speak to the U.S. government . . . about the syndrome of administrative action."

He also visited Jack Anderson's office and persuaded the journalist to do a radio spot on his plight.

On Sept. 17, the board, after receiving testimony by a Coast Guard affirmative action officer that the racial climate at the time aboard the Glacier "left much to be desired and was cause for considerable concern," ruled in Stewart's favor.

The Coast Guard did not contest Stewart's claim before the board.

Despite his victory, it took the Coast Guard another month to compute Stewart's back pay, almost two years' worth, and allowances. Meanwhile, Stewart had run out of cash.

A bill collector retained by an Arlington motel where Stewart had moved kept calling him to get him to pay his $790 tab. Stewart moved in with a friend on Capitol Hill and pressed the Coast Guard to expedite his check.

Yesterday, the check was ready and a smiling Stewart picked it up from the Coast Guard personal support office in Southwest. With any luck, he said later, he'll be back in California this weekend.

Not everyone with whom Stewart came in contact was impressed with his method of operation.

"I'm very disappointed with the decision," said Lt. Robert Meeks, a Coast Guard lawyer familiar with the case. "His was the typical application from the typical Coast Guardsman who wants his discharge upgraded." And anyway, it's a case where there's no merit."

"As a matter of fact, he probably slowed us down . . . he bothered us so much," said Jim Clark, who was in charge of processing Stewart's claim for back pay.

Stewart retorts that he "had to put everything on the line in order to correct what has taken place. "I came here to set my recort straight, not to create other problems."

Stewart also has come choice words about his experience in Washington. "This place is just like a bus station," he said looking at the crisp brown autumn leaves. "It's a place they send you to make you wait. Procrastination, procrastination. People back here thrive on it."