John Lennon, a former member of the Beatles, the rock group that transformed popular music in the 1960s, was shot and killed last night outside his luxury apartment house in Manhattan.

The 40-year-old British-born musician and composer was shot several times at close range a few minutes before 11 p.m. as he entered the building at 72nd Street and Central Park West.

Lennon, bleeding profusely, was rushed in a police car to Roosevelt Hospital, about a half mile away. Although desperate efforts were made to save him, a doctor there said he was dead on arrival.

Police quickly took into custody a suspect they described as a "local screwball." No motive for the shooting was immediately apparent.

As news of the shooting spread, several hundreds people, many with tears in their eyes, gathered outside the building where almost reclusively in recent years with his wife, Yoko Ono, and their 5-year-old son, Sean.

Lennon, one of the most successful and popular composers of all time, had just released a new album, "Double Fantasy," which he made with his wife and which was aimed at making a comeback for the couple.

Before the Beatles broke up at the end of the 1960s, the quartet appeared in movies, sold more than 250 million records and was credited with creating the music that indelibly marked the generation.

A few minutes before 11 last night, according to the early accounts of police and passersby, Lennon and his wife emerged from a limousine and walked toward the doorway of their century-old building.

Near the iron-gated entrance, a man called to Lennon by name, a police lieutenant said.

Lennon turned and four shots rang out.

Ono screamed "Help me!" according to a passerby.

Someone reportedly asked the gunman if he knew what he had done.

"I just shot John Lennon," the man replied.

Lennon had no last words, police said.

Police arrived swiftly and too, into custody a man thought to be between 30 and 40 and described as dark-haired and heavy-set.

According to several neighbors, the man had been loitering near the entrance to the elegant apartment house for several days.

Sunday night he reportedly had asked Lennon if he could take his photograph. One neighbor said Lennon permitted the man to snap one picture, but walked off when he tried to take another.

Another source said that earlier yesterday the man had asked Lennon for his autograph.

According to one passerby, the man police took into custody remained outside the apartment building, the Dakota, after the shots were fired.

He "hung around as if nothing had happened," said the passerby, who identified herself only as Nina.

"I'd leave if I were you," she said the man told her. "The cops are going to be here soon."

Police said they were handling the case with great care and would await the arrival of a representative of the district attorney's office before they began questioning the suspect.

The case, asserted 20th Precinct Lt. John Schick, "is just as important as the assassination of John F. Kennedy."

The suspect was not identified immediately.

After police arrived at the shooting scene, Lennon, who appeared unconscious, was placed in a police curiser for the trip to the hospital.

Physicians there "worked like crazy" in an effort to resuscite him, one hospital employe said. "There's blood all over the place," the worker said.

Despite the efforts,said a hospital official, Lennon was dead on arrival at the emergency room.

The official said his body showed several wounds, but the number of times he was actually hit was not precisely determined. Witnesses said at least four shots were fired.

Earlier last night, Lennon was reportedly at a midtown Manhattan studio called the Record Plant.

Jack Douglas, Lennon's producer, said that both he and Ono had been at the Studio with Lennon, and that Lennon left about 10:30 p.m.

According to the producer, Lennon said he was going to get something to eat and go home.

Lennon and his wife arrived outside their apartment house in their chauffeured limousine about 20 minutes later, thanked the driver and walked toward the building.

After the shooting, according to the policeman who took her to the hospital, "Yoko was hysterical."

After being brought back to the Dakota from the hospital, she appeared unwilling to accept what had happened, the policeman, Anthony Palma, said.

"Tell me it isn't true," he said she wailed repeatedly.

Lennon rocketed to fame in the early 1960s when he and fellow Britons Paul McCartney, George Harrison and Ringo Starr intoduced a new sound that changed the course of rock 'n' roll.

Lennon, who turned 40 on Oct. 9, was responsible for writing many of the group's songs.

In an interview earlier this year -- his first major interview in five years -- Lennon said he had wanted to leave the Beatles as early as 1966 but did not make the move until four years later because he "just didn't have the guts."

After the Beatles broke up in 1970, Lennon continued writing songs and recording. But in 1975 he dropped out for five years, saying he wanted to be with his son and his wife.

It was not until last summer that he returned to music, and his 14-song album, "Double Fantasy," was released last month. The album, which includes songs by Ono, is based on Lennon's experiences over the five years, during which he kept house, cooked and cared for their son.

The seed for the Beatles band dates back to 1955 when Lennon met McCartney at a Liverpool, England, church social. The two started performing as a duo, called the Quarrymen, and were joined three years later by Harrison.

Starr did not come into the band until 1962 -- a year before the Beatles hit the top of the charts in Britain with "Please Please Me."

"Beatlemania" did not cross the ocean to the United States until 1964, when "I Want To Hold Your Hand" was released and the late Ed Sullivan invited the Beatles to appear on his weekly television show.

"Meet The Beatles" because the best selling record album in history to that date.

The British invasion had begun, and in August 1964, a Beatles film, "Hard Day's Night," opened to critical and popular acclaim.

Albums to follow included "Rubber Soul," Revolver," Sgt. Pepper's Lonely Hearts Club Band," "The Beatles (white album)," "Abbey Road."

Some critics blamed Lennon's 1969 marriage to Ono for the breakup of the Beatles after she was denied a "fifth Beatle" status. But Lennon denied it.

Lennon, who released a dozen solo albums after the Beatles breakup, said he was most affected by early rock 'n' roll, blues music and Elvis Presley.

"The blues is a chair not a design for a chair, or a better chair . . . it is the first chair," Lennon said in a 1970 interview with Rolling Stone. "It is a chair for sitting on, not chairs for looking at or being appreciated. You sit on that music. . . .

"We didn't sound like anybody else, that's all. I mean we didn't sound like the black musicians because we weren't black. And because we were brought up on a different kind of music and atmosphere. And so 'Please Please Me' and 'From Me to You' and all those were our version of the chair. We were building our own chairs."

In Washington last night, the news of Lennon's death broadcast by radio and television stations left long-time Beatle fans in shock and dismay.

Telephone lines at local broadcast outlets were tied up for hours; switchboards at The Washington Post were busy with callers asking for details.

"Tell me it's not true," University of Maryland sophomore Marshall Goldman begged a reporter. When told it was, he paused and then said, "I just want to go outside and scream. I don't believe it."