SAN FRANCISCO — A California law that mandates DNA samples be taken from felony arrestees is unconstitutional, a state appeal court ruled Thursday.

“The question this case presents, which is increasingly presented to the courts of this state and nation, is the extent to which technology can be permitted to diminish the privacy guaranteed by the Fourth Amendment,” wrote First District Justice J. Anthony Kline.