As Lorena Shih of Potomac was finishing eighth grade, her parents heard of a new kind of education being devised at Montgomery Blair High School: a concoction of sophisticated mathematics, science and computer classes intended to draw smart teenagers from throughout Montgomery County. "I was really against it," said Shih, who said she was reluctant to forsake her friends, who would go on to Montgomery's prestigious Winston Churchill High, for a school with a bruised reputation 11 miles away in Silver Spring. "What I heard about Blair was, it was a big druggy school; it had a lot of people with guns." But her parents were persistent, so she cut a clever deal. "I made them sign a contract that said if I didn't like it after 30 days, I could go back." On her 30th day at Blair, Shih arranged to transfer back to her old school. But on the 45-minute bus ride home that afternoon, she recalled, "I thought about all the people I'd met. I thought, the classes were kind of fun." She decided to stay at Blair. That was in 1985. This month, Shih graduated from Blair, one of 72 seniors who are the first products of an ambitious, expensive and unprecedented attempt by Montgomery school officials to use a special magnet program to correct a high school's racial imbalance. Inserted into the 2,000-student school, the magnet provides 400 teenagers a souped-up technical education, with handpicked teachers and an emphasis on research and interdisciplinary work. Now that it has its first graduates, this approach appears to have succeeded in many of its goals, according to interviews with students, teachers, administrators, parents and residents. It has, they say, bolstered Blair's racial balance, academic accomplishments and image. But it also has had a variety of negative side-effects, including magnet students squeezing others out of top rungs in extracurricular activities and in class rank. "I think the magnet has been terrific for Blair," said Michael Richman, a Takoma Park parent who will become Blair's PTA president this fall. "Now it is not the school with the . . . biggest problems. My sense is Blair has turned the corner." That once seemed uncertain. When the magnet began, Blair had barely weathered a hostile campaign in the early 1980s by a conservative school board that considered dismantling the school. The school's racial composition -- more than two-thirds minority, including immigrants from more than 50 countries -- was out of conformity with county desegregation guidelines. Blair's standardized test scores were the lowest of Montgomery's 19 high schools. It was sending the fewest graduates to college, and it had a widespread, although many contend undeserved, reputation as a tough, urban school. In that climate, Shih was not alone in her skepticism about the magnet -- even one that tapped into a hunger in Montgomery and nationally for stronger math and science education. "The whole idea of turning around a school whose reputation had been at the bottom of the heap for so many years . . . there was real uncertainty," said Kay Meek, a Silver Spring resident and a longtime community and PTA leader. "I had parents in my office in tears trying to decide whether to send their kid here," said Leah Cutler, the magnet program's guidance counselor. "They've hocked everything to buy a house in the {Walt} Whitman {High School} district {in Bethesda}, and now their kid wants to come to Blair." In retrospect, Shih said, "I guess I was just being foolish" to have resisted the school at first. Shih, who will study economics at the University of Chicago, is one of many of Blair's first magnet graduates who will scatter this fall to the nation's most distinguished universities. They will enroll at most of the Ivy League schools, the Massachusetts Institute of Technology, Stanford University and the University of California at Berkeley, among other places. The graduates, only half of whom plan to major in math or science in college, also have reaped a caliber and number of academic accolades unknown at Blair for many years. They include Westinghouse Science Talent Search prizes, National Merit Scholarships and a top berth two years in a row in a nationwide supercomputing contest. Some benefits from the magnet spill over to the rest of the school. There are more honors courses now in English, social studies and other subjects, because the magnet students spend half their day in the regular school. Extracurricular activities are more bountiful, in part because magnet students have revived a literary magazine, energized the student government and signed up for flagging sports teams. "It's the first time in the history of swimming and diving that the coach had to cut," said Robert Carey, the head guidance counselor. "Usually, he is begging kids to come out. Most of them were magnet kids, but it brought other kids out." And after years of absence, college recruiters from the nation's top universities flocked to the school last fall. Perhaps most important, these changes appear to have improved opinions of the school. The number of local families requesting to transfer their teenagers from Blair to a different high school has plunged from 92 in 1985, when the magnet started, to 17 this year, according to school system figures. White flight from Silver Spring has slowed, community members and educators believe. "A few years ago, it was very popular to pick up and move so you did not go to Blair," said Pam Magrath, the current PTA president. "Now, families you know in the neighborhood are staying." The enhanced image has spread beyond the local neighborhoods. "Every time one of those kids comes down from Germantown and he is smiling and happy and speaks very highly {about the magnet}, it's changing, slowly but surely, the image of Blair High School," said James Redos, chairman of the regular science department. To derive those benefits, the Montgomery school system has invested heavily in Blair. This year alone, the county spent nearly $700,000 above the usual high school costs for additional magnet teachers and staff, text books and equipment. That sum, three-fourths of which is supplied by county taxpayers, means that the cost for each magnet participant is 28 percent higher than for Montgomery's regular high school students, according to the school system's budget office. School officials have invested political capital, as well. Last year, the school board essentially spurned pleas from parents in the northern part of the county for a similar math-science program nearer their homes. School Superintendent Harry Pitt told them to wait several years, saying he did not want to create a rival that might lure white students from Blair. Not everything has gone smoothly. Although the magnet students, three-fifths of whom are white, have stabilized Blair's racial composition, they have not balanced the student body as much as school officials had envisioned. Administrators concede that the original goal of 50 percent minority was unrealistic, saying they will be satisfied if Blair stays near its current minority level of 64 percent, twice as high as the school system as a whole. And while administrators promised to let Blair's other students take magnet classes if they qualified, few actually are doing so. This year, only 13 of the 800 regular juniors and seniors took part. "We haven't done a good job" at shepherding regular students into those courses, acknowledged Phillip Gainous, the principal. "Now that we know that . . . it'll pick up." Some contend that magnet students are so eager for extracurricular activities that they are inadvertently knocking other students aside from leadership positions. This past school year, for example, the editor of the student newspaper, the senior class president and the entire math team came from the magnet program. "At the beginning of the year, there were some non-magnet kids who came to practice," said Chase Garfinkle, a magnet student from Bethesda on the math team, which placed first this year in county competition. "But they were {second string} and dropped out." The heavy presence of magnet students is problematic at a time when the school system is striving to increase the participation of minority students in school clubs. "We are working against ourselves," said Gainous, the principal. "We want those magnet kids to be thoroughly assimilated and to participate, but when they do, they are taking slots away from minority students we want to encourage." In addition, many regular Blair teenagers are disturbed that the school combines magnet students with the rest in computing class rank. As a result, magnet students accounted for nine of the top 10 students in this year's graduating class of about 450, including the valedictorian and two salutatorians. Students have appealed, without success, to the Montgomery school board to switch to two separate rankings, arguing that their standing, inevitably lowered with the addition of 100 magnet students per class, could harm their chances of getting into a college or qualifying for a scholarship. "If they weren't there, I would have been one of the smartest kids in the school," said Charles Glass, an honors student outside the magnet, who graduated this month 75th in his class. Glass, a student government officer who had the lead in this year's school musical and will attend Johns Hopkins University, said he had many friends, including a girlfriend, who were magnet students. Still, he said, "I have a lot of resentment toward the program." Although the magnet program pledges to share some of its special equipment, Glass said he was turned down in his junior year when he asked to borrow a laser for a physics project. To study the refraction of light in water, he said, he ended up using a flashlight. Said Meek, the PTA leader who has been a proponent of the magnet: "There are jealousies anytime there is a new baby in the house." But, she added, "I have concern that the magnet not become the overriding and dominant force in that school." At the beginning, there appeared little danger of that. "I think the first year, people didn't quite know what we were about," said Michael Haney, the magnet program's director. "The second year, there was some organized resistance" from county principals who were reluctant to relinquish some of their best students. After that, "it really changed drastically," said Michael Haney, the program director. About 300 students -- one-fifth of the Montgomery eighth-graders who met the program's test score and course prerequisites -- applied for the 100 slots in this fall's freshman class, according to school figures. The magnet still has trouble attracting girls, who account for fewer than one-third of the participants, while it has a disproportionately high number of Asian American students. Both patterns are common among special math and science high school programs around the country. It also has drawn few black and Hispanic students, who will account for only 8 percent and 4 percent, respectively, of the freshmen in the magnet this fall. This has posed a predicament for school officials who, on the one hand, want more minority students to take part in accelerated courses but, on the other, worry that too many such students would frustrate the magnet's desegregation purpose. But overall, Gainous, the principal, said he finds the school's renewed reputation -- and the magnet students' tangible accomplishments -- have made it easier to entice prospective participants. "When we first started the program, most of the questions were, 'Will my child be safe? How much drugs?' Now we almost never get a question like that." BLAIR HIGH AT A GLANCE

'88-'89 enrollment: 1,988. Magnet enrollment: 325.* Senior class: 451. Graduates from magnet program: 72. College enrollment of magnet graduates: 100%. Colleges magnet program graduates will attend: Harvard -- 2 Massachusetts Institute of Technology -- 4 Cornell -- 4 University of Chicago -- 2 Others: Carnegie-Mellon, Brown University, University of California at Berkeley, Columbia University, Johns Hopkins University, University of Pennsylvania, Princeton University, Stanford University, U.S. Naval Academy. National Merit Scholarship semi-finalists: 17 (15 of whom were in magnet program). Westinghouse Science Talent Search finalists: 3 (all from magnet program). Nine of top 10 graduates are from magnet program. *The program will reach an enrollment of 400 at capacity. SOURCE: Blair High School officials