MARYSVILLE, Calif. (AP) _ Floodwaters from a ruptured levee spread across two submerged towns on Friday, leaving 28 square miles under water and as many as 26,000 people without homes, authorities said.

Trucks hauled rock 30 miles from a quarry in a frantic effort to fill in the 150-foot-wide gap in the Yuba River levee, which began to crumble Thursday at dusk after more than a week of fierce rains. And boats and helicopters searched the area for people stranded in the water.

''(Rescuers) found people boarded inside of houses, where they had taken boards and nailed them to the doors to keep the water out. They, literally, had to be pulled through windows and pulled through holes,'' said Ron Hedeke, a Marysville City Council member.

The water began to recede Friday evening, shrinking the flooded area to about 16 square miles, said Yuba County Undersheriff Dennis Moore.

As many as a third of the 26,000 residents of the farming communities of Linda and Olivehurst would be able to return to their homes Saturday, said Moore. But he said it could be two weeks before all the flood waters are gone.

''I can't see all the water being gone in less than 10 to 12 days. It hasn't anyplace to go,'' Moore said.

Gov. George Deukmejian toured the area Friday, reporting that the Federal Emergency Management Agency has recommended the White House approve federal disaster aid for 29 counties.

''Obviously, it's a very, very tragic sight to see water literally up to eaves of houses and up to the windows of shopping centers,'' he said.

Later Friday, President Reagan declared a major disaster in the state, making residents of at least nine flood-ravaged counties eligible for federal disaster assistance. More counties may be added later, federal officials said.

About 200 people were airlifted out of the area Friday, including nursing home residents and about 50 ''infirm and elderly,'' said Air Force Col. Roy Schindler, who directed the rescue.

One elderly couple who fled to the attic of their home as water rose was rescued when authorities using a boat to make house by house checks cut a hole in the roof to pull them to safety.

''I didn't get anything out except my pictures of the family,'' said Joyce Pirtle of Olivehurst, who was among the many refugees at Beale Air Force Base. ''After Tuesday, they said everything was fine and we shouldn't worry anymore.''

The refugees will not be allowed to return home until water supplies are certified free of contamination, Moore said. The area under water Friday was more than half the size of the city of San Francisco, he said.

One victim of the flooding was the Peach Tree Mall, a shopping center of 35 stores in Linda near the site of the break, which began as a 40-foot gap Thursday night about 130 miles northeast of San Francisco. Water was 16 feet deep at the mall, Moore said.

''Part of it is a two-story building, and all you can see of it is the K mart sign on the roof,'' said Moore.

A series of Pacific storms which began Feb. 12 killed at least 17 people, flooded thousands of acres and homes and set off hundreds of avalanches and mudslides in the West. An estimated 20 percent of Napa County's vineyards were damaged, and Duekmejian said damage could total $300 million.

The storms drove the Yuba River to a depth of 76.5 feet on Tuesday, well above flood stage, although it had dropped significantly when the levee broke.

''In the summertime, it's just a trickle,'' said Capt. Joseph Saxon, a spokesman at Beale. ''You can walk across it.''

''This is my third flood - one in Arkansas, the big flood (in Yuba City) in 1955 and now this,'' said Connie Dickens, 67, of Olivehurst. ''This is the third time I've had to start over. I'm going to get some place in the hills. I've lost everything.''

''It's just been disaster, worry, nervousness, no sleeping, stomach in knots,'' Kathy Guynes of Olivehurst, who was at a shelter in Sutter, told Associated Press Radio. ''It's kind of hard to imagine going back to a home and having absolutely nothing. But I guess the most important thing is that everybody got out safe.''

Twenty-five boats and eight helicopters searched for victims Friday. There was no estimate of the number of people rescued, but California Highway Patrol spokesman Bob Wells said he saw dozens plucked from cars stalled on Highway 70 in the flooded area.

State flood control spokesman Bill Helms said the break in the levee came as a surprise, since the water level in the Yuba and nearby Feather rivers had been dropping and the levees appeared solid.

After the break, evacuation warnings were broadcast in English, Spanish and Punjabi - the latter for a large colony of farmers from India. Traffic backed up three miles from Beale, one of a dozen evacuation shelters.

There were few injuries reported. Three people were hospitalized for exposure, and Carol Wilson, 23, of Linda, gave birth to a son shortly after she reached the Beale refugee center.

One major problem, said Moore, is what to do with the water after repairs to the levee are completed. Temporary repairs will take a day or two, with permanent repairs expected to be complete in five days.

''There's no place to drain it,'' he said. ''You build a levee to keep water out. When it gets inside the system (through a break), the levees keep it in.''