Northwestern High School Principal Boyse Mosely points to the graffiti-scarred walls and dilapidated bathrooms of his aging school building and then nods toward downtown Baltimore, where gleaming new high-rises tower over the harbor.

"Mayor Schaefer has had the genius and innovative skills to get money to build an Inner Harbor, an aquarium," said Mosely, a 22-year veteran of the city schools. "Why didn't he use that creativity to get more funds for the school system?"

That question dogs Baltimore Mayor William Donald Schaefer who, since his first election 15 years ago, has presided over consistently troubled public schools, a stewardship brought into sharp relief by his success in overseeing the city's booming redevelopment.

As Schaefer wages a gubernatorial primary campaign in which his mayoral record is viewed as a blueprint for how he would govern the state, education is perceived by supporters and critics as the issue on which he is most vulnerable.

The Baltimore public schools -- Maryland's largest district -- are seen as a key test of how much importance Schaefer attaches to education, a factor that has grown more critical as dwindling federal funds force the nation's governors to take a more active role in public schools.

Many of the arguments over Schaefer's handling of the schools revolve around money, and the statistics are telling:

The city ranked last among the state's 24 jurisdictions in the percentage of local revenue spent on education, according to state figures for the 1984-85 school year.

The city's total expenditures per pupil, $3,098 in 1984-85, rank 19th in the state. Baltimore ranks sixth on this measure among nine large urban systems around the country, a position virtually unchanged over the past decade.

When local financial contribution is measured as a percentage of the school budget, Baltimore ranks near the bottom among these same urban districts.

Critics point to other problems: The city had the lowest attendance rate in the state last year, and, like all big-city school systems, it has a high dropout rate. At 11.5 percent among secondary school students, the city's rate is more than twice the state average, according to state officials.

Schaefer, 64, can be held more accountable than most big-city mayors for the city schools because, unlike most, he appoints the nine-member school board. Also, as a member of the city's five-member Board of Estimates, he influences a majority of its votes and controls the school system's purse strings.

"If he has an Achilles' heel, it's going to be education," said Andrea Bowden, supervisor of science and health education for the Baltimore schools. "I think he's done a wonderful job in terms of the revitalization of downtown . . . but I think education has been neglected."

Schaefer's handling of the schools is important in this campaign for several reasons. His opponent in the Democratic primary, state Attorney General Stephen H. Sachs, has propelled education to the forefront of the debate by proposing a 1-cent increase in the state's sales tax, which would aid the schools. In this predominantly Democratic state, the winner of the Sept. 9 primary is expected to win the general election.

Also, Schaefer's handling of education tells voters something about his style of governing: He prefers quick, decisive action aimed at visible problems and tends to eschew more complex policy analysis.

Schaefer and his supporters say he visits schools regularly, has fought persistently for school funds from Annapolis and Washington and has asked for greater influence over a school system that he has said is poorly managed.

In 1979, the city sued the state in an effort to revamp Maryland's local school aid formulas and increase funding for Baltimore. The city lost its suit, but Schaefer argues that the effort influenced legislators to adopt a new funding formula that benefits Baltimore schools.

Schaefer and his aides argue that it is unfair to compare the city system with those of other jurisdictions in the state because of Baltimore's limited tax base and a disproportionately high demand for social services, problems endemic to a large urban center. But when variables such as net taxable income and property assessments are factored in, the city's spending on schools still falls short of the state average, at 11th place.

School officials offer measures to show that Baltimore's schools are improving. They cite Baltimore's rising standardized test scores: Students were two years behind national norms in 1977 but have passed these norms in mathematics and are approaching them in reading.

On Scholastic Aptitude Tests, student scores improved by just more than 2 percent last year but still fall below the national average.

Other large districts have also gained on these measures. New York City officials, for example, report that the percentage of students there scoring at or above grade level in standardized reading tests has risen from 43 percent to nearly 57 percent between 1978 and 1985.

Baltimore does look good on some fronts. Average attendance among the system's 112,000 students rose 2 percent this year to 87 percent, its highest rate in 16 years, officials said. And the city compares favorably -- ranking third among nine other large cities -- on the average number of pupils per teacher, according to the U.S. Department of Education.

"I'm sure the mayor is vulnerable to the extent that he's had a school system with all the problems of this city or other cities," said Robert Embry, a developer and president of the city school board. "I don't think anybody has done better."

Embry argues that the development-versus-textbooks debate is "simplistic" and inherently unfair because the revitalization of downtown has been funded largely with private money.

"People will tell you he cares too much about the Inner Harbor . . . but the percentage of the city budget spent on such things is infinitesimal," said Embry. Schaefer also argues that school budgets have benefited from a healthier tax base bolstered by the downtown renaissance.

While his redevelopment efforts have been aimed at attracting new businesses and residents to the city, many cite the schools as their motivation for leaving Baltimore.

"Just talking to the kids in the neighborhood, I knew that their school was not a school I wanted my child to go to," said Elliott Wiley, who moved with his wife Rosalyn and 4-year-old son from an inner-city neighborhood to Baltimore County last month.

Parents and teachers long have complained about severe shortages of textbooks and supplies. A task force appointed last year found that in a two-year period ending in 1985, a quarter of a million of the system's 1.6 million books were lost, stolen or unaccounted for.

"Some of the things are crazy," said Tru Ginsburg, who has two children in the system. "At one point, parents were bringing toilet paper" because the school's supply had been exhausted.

Also, a citizens committee appointed by school Superintendent Alice G. Pinderhughes last year to study the city's fine arts education concluded that erosion of the program had left it "one of the worst" in the nation. Four of the city's 17 high schools have no art teachers, two are without vocal music instruction and five have no instrumental music courses.

While Schaefer acknowledges that the schools have shortcomings, he says one of the system's most crippling problems is its unfairly negative image in the community. Sachs says that shows Schaefer gives image precedence over substance.

Schaefer has always regarded the schools as "a problem and not as an opportunity," said Sachs. "The guy who became the city's great cheerleader . . . it apparently never crossed his mind to do it for the schools."

Schaefer, however, says that Sachs has never run a school system and fails to understand its realities.

"I don't defend myself on education," said Schaefer. "In my conscience, I know I work as hard for kids and education as anyone. You can't blame the mayor for the failure of parents to keep their kids in school. You can't blame the mayor for drugs."

The school system was in trouble when Schaefer inherited it in 1970, two years after the city's 1968 racially sparked riots. His administration was handed a federal desegregation order, and in the wake of a school busing plan white families began to flee Baltimore, much as they did in other big cities. In 1975, Schaefer appointed the school board's first black majority to oversee the predominantly black system, and the board has since hired black superintendents.

During his tenure, Schaefer says, he has been successful in getting local businesses involved with the schools. Also, this month a Baltimore law firm said it would solicit private funding to buy new textbooks for the schools.

When he talks about schools, as in many other issues, Schaefer usually focuses on nuts and bolts. In an interview, he told of visiting a school where half the building was hot and the other half cold. "I brought in an engineer and solved the problem in two weeks," he said.

Pinderhughes, appointed four years ago with strong support from Schaefer, laughs about a public reprimand she received from Schaefer, not over teacher testing or textbook shortages, but for keeping schoolchildren away from a Flag Day ceremony when temperatures climbed past 100 degrees. The mayor "was furious with me," said Pinderhughes, who supports Schaefer in his race for governor.

"He is criticized by some people for not giving the city schools enough money, but I just don't know what he can do with what we have here in the city," she said. "Are you going to cut down on police? The fire department?"

Since 1975, the portion of the city budget going to police and fire protection has remained about the same, as incidents of major crime have gone down. During the same period, the portion of the local budget devoted to schools decreased from 31.3 percent to 27.2 percent.

City officials point out that population decreased during that same period and that there was an enrollment decline of nearly 35 percent and an increase in per-pupil spending. But the city's per-pupil spending for instruction increased at a smaller rate than in other Maryland jurisdictions, dropping Baltimore's ranking from ninth a decade ago to 18th in 1984-85.

Schaefer has said that if he is elected, his top education priority would be to work for passage of a revamped state aid formula that would increase the city's share of state funds. He privately lobbied during the 1986 General Assembly for a measure that would have increased the state's education spending significantly. That bill died in part because of protests led by richer jurisdictions and Senate President Melvin A. Steinberg, a Baltimore County Democrat who Schaefer has chosen to be his lieutenant governor.

Even as he fights for increased state funding, Schaefer discourages criticism of the school system's failings; many of the criticisms have been prompted by financial problems he details in Annapolis. Beverly Corelle, president of the Maryland State Teachers Association, said Schaefer told a PTA convention audience recently: "Instead of complaining that the school system doesn't have books, you should go out and buy books."

Bowden described a similar remark Schaefer made to her when they were discussing teacher morale. According to Bowden, Schaefer said, "If people don't like teaching in Baltimore City, let them go to Baltimore County or Montgomery County."

Bowden said she responded: "They are, they're going in droves."