Phil Gramm is a very special case. In his second term he co-authored the Gramm-Latta tax bill that enacted the Reagan agenda in 1981. Tip O'Neil was furious and had him removed from the budget committee in 1983 after he was re-elected in 1982. As a result Gramm had absolutely no political future as conservative Democrat in the House.
Fortunately Tip O'Neil's famous line "all politics is local" proved to be very true in Phil Gramm's district. Because he represented narrow gerrymandered district, he was able to run a campaign that foreshadowed his Senate campaign in 1984. His district ran from Northwest Houston to Southeast Dallas with College Station in between.
The idea when it was created in 1970 was to use yellow dog votes in the rural areas to cancel out the Republican votes in the suburbs of Houston and Dallas. Texas A&M which was located in the 6th district not only is one of the most conservative public universities in the country, but it also was the fastest growing university in the country. Enrollment grew from 13,000 students in 1970 to 32,000 students in 1982. The growth of Texas A&M and the ratification of the 26th amendment (allowing 18 year-olds to vote) created the conditions allowing Gramm to switch parties. The fact that the district included two top ten US media markets meant the special election got lots of media coverage in the most important cities for a Republican candidate for statewide office to carry.
After spending over a million dollars campaigning in his special election, Phil Gramm won back his seat with a majority in the first round against the son of the longtime Democrat Congressman he had unseated in the 1978 Democrat primary. About a month after Gramm won his House seat back, four-term Republican senator John Tower announced he would not seek a fifth term. Gramm almost immediately announced his candidacy for Tower's senate seat which he won in 1984.