Gov. Dave Heineman of Nebraska signed a law on Tuesday banning most abortions 20 weeks after conception or later on the theory that a fetus, by that stage in pregnancy, has the capacity to feel pain. The law, which appears nearly certain to set off legal and scientific debates, is the first in the nation to restrict abortions on the basis of fetal pain. Abortion opponents praised the law and said it was justified by medical evidence gained since Roe v. Wade was decided in 1973. Abortion rights advocates said that the measure was unconstitutional, and that the motive behind it was to set off a challenge to legalized abortion before the United States Supreme Court.