WASHINGTON — Thad Cochran, a Mississippi Republican who was first elected to the Senate in 1978, set up a generational and ideological clash in the state’s Republican primary when he announced Friday that he would seek a seventh term in 2014.

“I will run hard and be successful so that I can continue to serve the people of Mississippi and our nation effectively,” Mr. Cochran said.

While Mr. Cochran, who turns 76 on Saturday, has the support of many leading Republicans in the state, he is already facing opposition from Chris McDaniel, 41, a state senator aligned with the Tea Party, who announced his candidacy in October and has won the support of some conservative groups.

Mr. Cochran, who has raised less than $1 million for his re-election, had been thought to be leaning toward retirement. A group of Mississippi state legislators visited him in his Washington office this week and urged him to run, but he had offered no hint of his plans. Mississippi Republicans said they ultimately believed Mr. McDaniel’s challenge and pleas from powerful figures across the state that Mr. Cochran seek another term prompted the senator to mount what will probably be his final campaign.