Twitter is set to start trading its shares on the New York Stock Exchange later this week. This morning it filed an amended S-1 document revealing that IBM has accused Twitter of infringing at least three of its patents: US Patent No. 6,957,224, "efficient retrieval of uniform resource locators," No. 7,072,849, "Method for presenting advertising in an interactive service," and No. 7,099,862, "programmatic discovery of common contacts."

The '849 patent in particular took a strikingly long time to issue. This patent on a way of presenting ads was filed in 1993, has a "priority date" of 1988, and wasn't granted until 2006.

At this point, the threats take the form of a letter, not a lawsuit. The letter is "inviting us to negotiate a business resolution of the allegations," reports Twitter, which adds that it believes it has "meritorious defenses" to IBM's patents.

IBM has become legendary for turning its patents into a massive licensing machine that at one point was pulling in $2 billion annually. It's been unafraid to use patents it gained in pre-Internet research as a tool to browbeat Internet companies; witness the lawsuit IBM filed against Amazon in 2006, which settled the following year.

Twitter has pledged to use its patents only for defensive purposes. The company recently revealed that it has a small stable of just nine granted patents, which pales in comparison to the thousands held by Big Blue. Still, Twitter is a company that paired fundamentally simple inventions with good design and great timing. So going after one of the most wide-reaching and popular Web 2.0 services could produce more than a little negative publicity.