From a few million dollars in the early 1980s, support for the resistance grew to $750 million a year by the end of the decade. The financing was funneled to Afghanistan in secret by Mr. Wilson and other lawmakers.

Image Representative Charlie Wilson in 1988, holding a British-made Enfield rifle in his Capitol Hill office. Credit... Marcy Nighswander/Associated Press

The help went beyond money. When the Soviets deliberately killed camels and mules to cripple the Afghan fighters’ supply lines, he flew in Tennessee mules. When the Central Intelligence Agency refused to provide the guerrillas with field radios for fear that mujahedeen transmissions would be picked up by the Soviets, he sent an aide to Virginia to buy $12,000 worth of walkie-talkies from a Radio Shack outlet.

Particularly helpful were Stinger missiles from the United States, which were used to shoot down Russian helicopters and became what many consider a decisive factor in wearing down the Soviets. By February 1989, the Soviets had withdrawn and the United States ended its support.

In later years Mr. Wilson insisted that the United States had not made a mistake by supporting the Afghan rebels, among them Osama bin Laden and the Islamists who would form the Taliban regime. He said if the United States had helped rebuild Afghanistan, it would have remained stable and not become a safe haven for Al Qaeda.

Charles Nesbitt Wilson was born in Trinity, Tex., where his father was an accountant for a lumber company, on June 1, 1933. He told about his first political experience in the book from which the movie was made, “Charlie Wilson’s War: The Extraordinary Story of the Largest Covert Operation in History” (2003) by George Crile.

Charlie was 13 when his dog strayed and a neighbor apparently fed it something that contained crushed glass. The boy first doused the man’s garden with gasoline and set it on fire. He then realized that the neighbor was a City Council member and used his learner’s permit to drive black voters to the polls to vote against him. The neighbor lost his seat by 16 votes.