Proving there is at least one person in this town who can keep a secret, Sen. Jacob K. Javits (R-N.Y.) confounded the political obituary writers yesterday and announced he will seek a fifth term this year at age 75.

The decision, announced by Javits at a New York news conference, ended months of intense speculation that underscored the unique role that this political maverick and master senatorial craftsman has played on the national political scene.

A liberal in a party dominated by conservatives, Javits has been a linchpin in the bipartisan consensus-making that keeps the machinery of Congress operating most of the time -- on issues ranging from civil rights in the 1960s to foreign policy today.

Although never taken seriously by his party for national political office, which he conceded yesterday that he coveted, his influence has cut deeper and extended wider than that of many better known political figures.

This short, balding, bespectacled son of impoverished Jewish immigrants whose first political lessons came at the hands of Tammany Hall wardheelers on Manhattan's Lower East Side would hardly seem to be a model for success within the GOP.

But, by virtue of intellect, diligence, unabashed self-confidence and an intricately crafted political base, he has outlasted all but two other Republican senators, Milton Young (R-N.D.) and Strom Thurmond (R-S.C.).

"He's an institution, not just a senator," said Sen. Charles McC. Mathias Jr. (R-Md.), a fellow member of the dwindling band of liberal Senate Republicans whose ranks would have been dealt a body blow by the loss of Javits.

Javits strung out his decision for as long as possible, not only giving him time to assess his health for another six-year term but also giving others time to ponder a Senate without one of its most prodigious, skillful workers.

The result was a wave of senatorial appeals for him to run again even for such old adversaries as Sen. Barry Goldwater (R-Ariz.), whom Javits declined to support for president in 1964. But, if he decided to run again, friends said last week, it would be primarily because of his own incurable addiction to work and politics -- and his abiding faith in his own ability to make a difference. Cynics also noted that such a suspense thriller was not a bad way to launch a campaign for reelection.

Although Javits runs strongly in New York polls, his age could be a problem. Rep. Jack Kemp (R-N.Y.) has been mentioned as a possible Republican challenger, reviving memories of the conservative coup that toppled Javits' old liberal Republican colleague, Clifford Case, in a New Jersey primary contest two years ago. Among Democrats, Rep. Elizabeth Holtzman, consumer advocate Bess Myerson and former New York City mayor John V. Lindsay are considered possible contenders.

Before a crowd of about 300 friends, supporters and jounalists at New York's Biltmore Hotel, Javits said it took "a lot of heart, a lot of brain, a lot of emotion and some time" to decide to run again -- a decision that he said was not finally made until Sunday night.

Not even his closest aides, who had prepared dual-choice endings for his prepared remarks, had been told before yesterday how the speech would end. New York newspapers yesterday carried stories quoting "experts" to the effect that he wouldn't run, and earlier this month ABC's Barbara Walters scored an exclusive with word that Javits was quitting.

As for his age, Javits said his "brain, memory and ability to communicate are as sharp as ever," although he acknowledged that he has developed a muscular condition called motor neuron. While the disease can be progressive, he said his doctors have assured him that his case is not.

Javits singled out his post as ranking minority member on the Senate Foreign Relations Committee at a time of international crisis as the crucial factor in his decision to run again. The crisis, he said, is "the whole reason I'm standing here this morning as I am instead of bidding you all a fond farewell."

Although foreign affairs is his current preoccupation, his interests during nearly 34 years in public office -- including eight in the House and 23 in the Senate -- have ranged from civil rights to the arts, private enterprise and health insurance.

Asked to narrow the focus, he has said he is proudest of his sponsorship of legislation leading to passage in the mid-1970s of the War Powers Act limiting a president's authority to wage war and of the Employe Retirement Income Security Act (ERISA) regulating private pension plans.

But others say his contribution in other areas was as great, if not greater. The civil rights legislation of the 1960s "could never have been passed without him," said Joseph L. Rauh, one of the movement's leading attorneys. "The fact he was always there shamed others" to go along and provide just enough Republican votes to break a filibuster, Rauh added.

As recently as late last year, Javits waged a lonely and unsuccessful post-midnight fight aganst senatorial confirmation of a southern federal judgeship nominee with something less than color-blind credentials.

It was this kind of outspoken, consistent liberalism, coupled with what some senators viewed as aloofness and abrasiveness, that kept Javits out of the formal ranks of power in the party. He was beaten for a minor Senate party post by arch-conservative Sen. Carl Curtis (R-Neb.) and his overtures for the Republican vice presidential nomination in 1968 were viewed at the time as a little odd.

Asked yesterday about his greatest disappointment, he said it was not having been "a candidate for president." But, as for his sometimes challenged Republican credentials, he said, "In all truth, I'm an orthodox Republican . . . a Lincolnian Republican."