The Justice Department, saying religion should not be excluded from public life, yesterday entered a Supreme Court case in support of the right of governments to sponsor nativity scenes at Christmas time.

Solicitor General Rex E. Lee submitted a friend-of-the-court brief challenging an appeals court decision that barred officials in Pawtucket, R.I., from including a small nativity scene in a municipal Christmas display.

" . . . We remind the court simply of its own well-known observation," the brief said, referring to a 1952 ruling "that 'we are a religious people whose institutions presuppose a Supreme Being.' "

"Since the days of the Pilgrims," the brief said, "we have devoted, as a nation, one day every year to giving thanks to God. More broadly, the federal government has, from the earliest days of the republic to the present, felt free to acknowledge and recognize that religion is a part of our heritage and should continue to be an element in our public life and public occasions.

"The United States has a deep and abiding interest in maintaining this longstanding tradition."

The brief in Lynch vs. Donnelly said the tradition does no harm to the First Amendment's church-state principles or to anyone's religious views. " . . . It was never the purpose of the framers to secularize our public life so rigidly that we cannot continue to mark our public holidays in a manner that includes traditional acknowledgment of their religious character," it said.

"We therefore ask the court to rule that the First Amendment does not mandate the contrived exclusion of religion from our public life."

The court will hear arguments in the case in its next term, which begins in October.