BATON ROUGE, La. (AP) Jimmie Davis, the singing governor who drew on his popularity as author of "You Are My Sunshine" to twice win election to the state's top office, died yesterday.

He was believed to be 101. Mr. Davis, the son of destitute sharecroppers in hardscrabble Jackson Parish, up near the Arkansas border, was never sure of his exact birth date.

"He died at 4:40 a.m., peacefully in his sleep in his home at Baton Rouge," said Ed Reed, his former press secretary.

Mr. Davis parlayed smooth talking and sweet singing into a political career, serving as governor from 1944 to 1948 and again from 1960 to 1964.

He estimated that he wrote more than 400 songs, including "Suppertime," a particular Southern favorite; "It Makes No Difference Now" and "Sweethearts or Strangers." He recorded at least 52 albums. But it was "You Are My Sunshine," one of the top five most-recorded songs ever, that was his first smash in the Depression era, that became his signature. He once explained that the song came to him one night in 1931 as he sat on the side of his bed in "a four-bit a night hotel," on the road making a bleak living as an itinerant singer.

Age had taken its toll on Mr. Davis, but he frequently mustered the strength to perform. He sang at his own 100th birthday celebration in Baton Rouge in September 1999.

"It's a great day for me," he said on that occasion. "I'm getting the hang of these things."

He credited Gov. Sam Jones and Huey Long's brother Julius with talking him into running for governor in 1943. Backers thought his popularity as a singer could help him end the crippling 15-year battle between the Long forces and their opponents.

The campaign was a bitter one, and some of the Longs, seeking to damage him among the fundamentalist poor whites along the dirt roads in the back woods, accused him of writing lewd and suggestive lyrics. When a pro-Long congressman played his "Red Nightgown Blues" at a rally, the crowd leaped up to dance to the music. The taunting stopped, and Mr. Davis won.

Last year, at his 100th birthday celebration in Baton Rouge, someone asked Russell Long, the son of Huey Long and a powerful U.S. senator in his own right, about that bitter campaign.

"None of that," replied Mr. Long, now 82 and retired. "He never said an unkind word to me or about me, and I never said an unkind word about him as far as I know. If you live a hundred years and you've got as many friends as this man has, you've done pretty well. He's a great American."

Though remembered as a country singer who got lucky in politics, he was no political neophyte. While pursuing his musical career, he had been elected police commissioner in Shreveport and to the state Public Safety Commission.

Once governor, he pushed through legislation creating the state's first driver's licenses, and, after election the second time in 1959, presided over the generally peaceful desegregation of Louisiana's public schools.

He called five consecutive special legislative sessions to resist federal desegregation orders, and created a grant program to aid private-school pupils after the courts prevailed.

"Everybody ran on the segregation ticket in those days," he recalled. "You couldn't be elected without it. When desegregation came, we did it without having anybody killed. We didn't even have a fistfight."

He set a record for absenteeism during his first term as governor, in part because he spent time in Hollywood making movies. One of his films, "Louisiana," was about a country boy who becomes a singer and then a governor. It was not nominated for an Academy Award. When he returned to Louisiana to run for governor again in 1959, opponents circulated a photograph of him dancing with a black woman in Hollywood, considered shocking by Southern black and white alike in those days. Some rural whites were more offended by a Baptist dancing. He shrugged it off and won.

He ran for governor a third time in 1971 and lost. He remained a gospel singer until late in life, his voice losing little of its strength over the years and growing in emotional depth. His annual spring concerts for the legislature, for which the big, boisterous House chamber would become as quiet as a church, were a Capitol tradition until he grew too frail for them in recent years.

He appeared regularly at the New Orleans Jazz and Heritage Festival until recent years. In 1994, he taped two shows for the Grand Ole Opry in Nashville.

He first recorded "You Are My Sunshine" in 1931, but was so dissatisfied with the studio's band that he refused to release the record. It was eight years before he recorded it again, and this time it was a hit.

He once rode his horse, Sunshine, onto the Capitol steps when he was criticized for buying a Cadillac limousine. He explained that he merely wanted to let Sunshine see his office.

Mr. Davis avoided politics in his later years, devoting his energy to his music. He once said his music is what he wants to be remembered for, as "someone who scattered a little sunshine along his path."

Survivors include his wife, Anna Gordon Davis, who sang with him in the gospel group the Chuck Wagon Gang; and a son, Jim.