Frank E. Petersen Jr., who suffered bruising racial indignities as a military enlistee in the 1950s and was even arrested at an officers’ club on suspicion of impersonating a lieutenant, but who endured to become the first black aviator and the first black general in the Marine Corps, died on Tuesday at his home in Stevensville, Md., near Annapolis. He was 83.

The cause was lung cancer, his wife, Alicia, said.

The son of a former sugar-cane plantation worker from St. Croix, the Virgin Islands, General Petersen grew up in Topeka, Kan., when schools were still segregated. He was told to retake a Navy entrance exam by a recruiter who suspected he had cheated the first time; steered to naval training as a mess steward because of his race; and ejected from a public bus while training in Florida for refusing to sit with the other black passengers in the back.

In 1950, only two years after President Harry S. Truman desegregated the armed forces, he enlisted in the Navy. The Marines had begun admitting blacks during World War II, but mostly as longshoremen, laborers and stewards. By 1951, he recalled, the Marine Corps had only three black officers.

But in 1952, Mr. Petersen, by then a Marine, was commissioned as a second lieutenant and the Marines’ first black aviator. He would go on to fly 350 combat missions during two tours, in Korea and Vietnam (he safely bailed out after his F-4 Phantom was shot down in 1968), and to become the first of his race in the corps to command a fighter squadron (the famous Black Knights), an air group and a major base.