SAN FRANCISCO — Square Inc., a manufacturer of mobile credit card readers, is taking an offensive stance against patent infringement accusations from a Cayman Islands-based company on a litigation spree.

Square’s lawyers at Wilson Sonsini Goodrich & Rosati filed a declaratory judgment action against Protegrity Corp. Monday in the Northern District of California. The suit seeks a judgment that Square has not violated two patents pertaining to database security.