Patricia Hearst will be freed Thursday.

President Carter announced yesterday that he was commuting the newspaper heiress' seven-year prison term for armed bank robbery to the nearly two years she already has served.

For Hearst, who became a national figure after she was kidnaped by the radical Symbionese Liberation Army in 1974, this means she will leave prison about five months before her likely parole in July. Carter's sction also means the 24-year-old Hearst will be free in time for her scheduled Feb. 14 wedding to her former bodyguard, Bernard Shaw.

After hearing of Carter's action, Hearst said in an ABC interview at Pleasanton, Calif., where she is imprisoned: "I'm really grateful... I'm going to my mother's house and... we're going to have a big reunion."

The White House announcement said the president followed the recommendation of Deputy Attorney General Benjamin R. Civiletti in granting the executive clemency.

Civiletti, calling the Hearst case "very unique and difficult," cited several reasons why the daughter of San Francisco Publisher Randolph A. Hearst should be freed:

She needs no further rehabilitation and is not a risk to the community.

Prosecutors and investigators most familiar with the case strongly recommended that she be released.

She already has been "punished substantially" and her release "will not end the suffering she will experience from the invasions of her privacy and the sensational and embarrassing commercial exploitations of her experiences."

The consensus of those familiar with her case is that without "the extraordinary criminal and degrading experiences that the petitioner suffered as a victim of the SLA she would not have become a participant in the criminal acts for which she stands convicted..."

Civiletti also told Carter it was ironic that Hearst -- the SLA kidnap victim -- is the only person serving a federal sentence for an SLA crime, according to a Justice Department statement.

Hearst was a fugitive for 17 months after she and SLA members robbed the Hibernia Bank in San Francisco in April 1974, two months after she was kidnaped from her Berkeley apartment.

The FBI mounted a massive search for Hearst and the SLA, several of whose members were killed in a Los Angeles shootout which Hearst missed. She was captured in San Francisco in September of 1975.

Although she maintained at her trial in early 1976 that she was brainwashed and forced to participate in the bank robbery, a federal jury found her guilty of armed robbery. A key piece of evidence against her was a tape recording of her voice as "Tania," an avowed terrorist who said she willingly took part in the bank robbery.

Over the past year, a diverse lobby has pressed for Hearst's release. Both liberal and conservative members of Congress, including the late Rep. Leo Ryan (D-Calif.), who was killed in Jonestown, Guyana, last November, called for Hearst to be freed. The "Free Patty" movement also included the FBI agent in charge of hunting her down and, after years of silence, the pages of her father's newspapers.

ATTORNEY General Griffin B. Bell, who agreed with Civiletti's recommendation to the president, has said that Hearst probably was treated more harshly than the usual defendant because of her notoriety and her family's wealth.

The procedure used to commute Hearst's sentence is a rare one, reserved usually for terminally ill prisoners, said a Justice Department pardon attorney last fall. President Carter has commuted only a dozen prison terms out of hundreds of applications, Justice Department records show.

There are strings attached to Carter's clemency offer, which Hearst and her sttorney, George C. Martinez accepted yesterday, a Justice Department spokesman said.

The conditions include a promise by Hearst that she will not leave the country for one year without Justice Department permission, break the law, associate with criminals, or carry firearms.

Hearst's mother, Catherine, greeted the news yesterday by saying, "I'm just the happiest person in the world. She has suffered for five years. I can't believe that it's going to be over."