As college pranks go, it was on a grand scale: a dozen Dartmouth students drove a flatbed truck to the campus green at 3 a.m. after the Martin Luther King holiday. With sledgehammers, they attacked a small shantytown erected in protest against South African apartheid.

As walls came crashing down, two female students sleeping there to guard the four shacks ran out in their long underwear, terrified, and called police.

The incident has thrown this 217-year-old Ivy League college into an uproar, sparking a 30-hour takeover of an administration building, a bitter confrontation with the school's president and the first suspension of classes for a political teach-in since the 1960s.

It has also focused attention on the tactics of campus conservatives. Ten of the 12 students charged in the attack are members of the Dartmouth Review, a weekly newspaper that has been an incubator for the New Right.

Graduates of the Review, whose members specialize in imaginative guerrilla warfare against affirmative action, feminism and homosexuality, are at work in the Reagan White House, at the Heritage Foundation and on the editorial page of The Wall Street Journal.

"This was a vile, destructive act," said Prof. Thomas B. Roos, a faculty leader. "It was brown-shirt bullying on the order of Kristallnacht," the night in 1938 when the Nazis burned down Jewish shops and synagogues.

While 200 students occupied the main administration building Wednesday night, giving speeches about campus racism and singing "We Shall Overcome," the alleged culprits at the Review offices were unrepentant.

Snacking on milk and cookies, with pictures of former president Richard M. Nixon on the wall, they said their "Dartmouth Committee to Beautify the Green Before Winter Carnival" took up sledgehammers "to restore pride and sparkle to the college we love so much."

The carnival, a festival whose bacchanalian tradition was a model for the movie "Animal House," revolves partly around a huge ice statue on the Green, a wide meadow in the center of campus where the shantytown was built in November.

"The reason we went to remove them at 3 a.m. was to avoid the potential for fist fights that might have occurred if we had gone out in broad daylight," Review Managing Editor Deborah Stone said.

The shanties were erected to dramatize demands that Dartmouth divest its holdings in companies doing business with South Africa. The faculty has voted unanimously for divestment, while the administration has opposed it -- along with the Review. Although initially issuing an ultimatum to antiapartheid activists to remove the wooden shanties, the administration eventually decided to let them stand rather than spark a confrontation.

"The shanties served an educational role -- increasing awareness on the part of the community to South Africa and apartheid," President David T. McLaughlin said. But as Stone and others saw it, "The administration is wimping out . . . , paralyzed with fear that they'll be met with cries of 'racism.'

"You can't be influenced by the spoiled-brat mentality that minorities have on campus these days," she said. "It took courageous students such as ourselves to take the matter into our own hands."

That they acted the morning after Martin Luther King's birthday was "sheer coincidence," she said.

McLaughlin said the 12 students violated the college code of conduct and will face the school's Committee on Standards next week. But the incident has reignited long-standing complaints about racial insensitivity here, although Dartmouth -- whose student body of 4,300 is 9 percent black -- has the highest proportion of minority students among Ivy League schools.

About half of the 200 students who occupied Parkhurst Hall today were black. Meeting one of their demands, the faculty declared a moratorium on classes Friday for "engaging in a campuswide discussion of racism, violence and disrespect for diversity and opinion, as most recently demonstrated by the act of demolition of the shanties on the Green."

In a two-hour meeting with McLaughlin before they left his office this morning, dozens of students -- black and white, male and female, straight and gay -- broke into tears as they recounted incidents of discrimination on campus and the outrage they felt at the shantytown attack.

"There's a feeling of insensitivity between races on campus," McLaughlin acknowledged in an interview later. "This is a diverse community and some people don't feel they have as much access to policy-making as others."

McLaughlin had already been under fire. A recent faculty report said his "style and pace of decisionmaking . . . have resulted in a sense of recurring crisis."

Faculty were particularly irritated at his decision last year to reinstate the Reserve Officers' Training Corps, suspended after the last takeover of an administration building here, in 1970.

McLaughlin was touring Florida alumni clubs when the shantytown was attacked, and many students today expressed anger that he was not present on King's birthday, when students and faculty held a candlelight march to the shanties.

In the five years since its founding, the Review has become a focal point for complaints of insensitivity here. A settlement was reached recently after a black professor sued the Review for calling him "a used Brillo pad." A 1982 Review article was headlined "Dis sho' ain't no jibe, bro." A Review writer surreptitiously recorded a meeting of the Gay Students Association in 1984 and reprinted parts of it.

Today, the hulks of three battered shanties stood on the Green beside a newly constructed shack named Martin Luther King Hall. A few feet away, building was beginning for the carnival. This year's theme is "Where the Wild Things Are," the title of a children's book by Maurice Sendak.