Alexander (Sandy) Courage, composer of the original “Star Trek” theme and an Emmy-winning, Oscar-nominated arranger for TV and movies, died May 15 in Pacific Palisades, Calif. He was 88 and had been in declining health since 2005.

Courage’s fanfare for the Starship Enterprise, written in 1965 for the first of two “Star Trek” pilots, was heard throughout the three original seasons of the show and has been reprised throughout all the “Trek” feature films and several of the TV series, notably “Star Trek: The Next Generation” in the 1980s and ’90s.

He won a 1988 Emmy as principal arranger for the ABC special “Julie Andrews: The Sound of Christmas,” and received Oscar nominations (both shared with Lionel Newman) for his adaptation scores for “The Pleasure Seekers” in 1963 and “Doctor Dolittle” in 1967.

Born in Philadelphia and raised in New Jersey, he received his degree from the Eastman School of Music in Rochester, N.Y. in 1941, then moved to California. He enlisted in the Army Air Corps in 1942 and became a bandleader at bases in California and Arizona.

After the war, he began working for CBS Radio, composing for such shows as “The Adventures of Sam Spade, Detective” and “Yours Truly, Johnny Dollar.” From 1948 to 1960, he worked as an orchestrator and arranger at MGM, including work on the musicals “Show Boat,” “The Band Wagon,” “Seven Brides for Seven Brothers,” “Guys and Dolls,” “It’s Always Fair Weather,” “Funny Face” and “Gigi.”

He also scored a handful of films in the late 1950s, including Arthur Penn’s “The Left-Handed Gun,” but television became Courage’s primary outlet for composition, including various episodes of TV series at Universal, MGM and Desilu. Most of Courage’s 1960s output was at 20th Century-Fox, where Courage scored episodes of “Voyage to the Bottom of the Sea,” “Daniel Boone,” “Lost in Space,” “Land of the Giants” and other series. His only TV theme other than “Star Trek” was for Fox’s legal drama “Judd for the Defense.”

In addition to his adaptation work on “The Pleasure Seekers” and “Doctor Dolittle,” he contributed orchestrations to such ’60s musicals as “Hello, Dolly!” at Fox and “My Fair Lady” at Warner Bros.

“Star Trek,” which went on the air in 1966, became his most famous work. In addition to the fanfare, series theme and scores for two pilots, Courage composed the music for just four other episodes. He did far more work on “The Waltons,” scoring over 100 episodes in the 1970s and early 1980s, plus four “Waltons” TV-movies in the ’80s and ’90s.

He received an Emmy nomination as composer on a “Medical Center” in 1973 and another as arranger for ABC’s “Liberty Weekend” ceremonies in 1986. He also appeared onscreen as a conductor in the 1981 Luciana Pavarotti film “Yes, Giorgio.”

As composing work in TV waned, Courage returned to orchestration for composer friends including John Williams (“Fiddler on the Roof,” “The Poseidon Adventure,” “Jurassic Park”) and Jerry Goldsmith (“”Basic Instinct,” “The Mummy,” “Air Force One”). He also adapted Williams’ themes for “Superman IV: The Quest for Peace,” and wrote orchestral arrangements for the Boston Pops, Barbra Streisand and Kathleen Battle.

He was among the founders of the Composers and Lyricists Guild of America, the union that represented composers and songwriters in Hollywood during the 1950s, ’60s and ’70s. He was also an award-winning photographer whose photos appeared in magazines such as Life and Colliers.

His third wife, the former Shirley Pumpelly, died in 2005. Survivors include four stepchildren and six grandchildren.