Image copyright Robin Y Richardson/News Messenger Image caption The county courthouse in Marshall's town square

Welcome to Marshall, Texas. Nestled in the pine forests near the Louisiana border, the town of about 20,000 has a quaint central shopping district dotted by boutique stores. In October it hosts a party celebrating fire ants - a stinging pest that bedevils the region's people and beasts. In winter, locals string decorations on their storybook local courthouse for a Festival of Lights.

In recent years, however, Marshall has not quite been the embodiment of small-town America that it at first seems. The Festival of Lights had an ice rink sponsored by technology giant Samsung. In fact, Samsung has taken an inordinate interest in Marshall, also funding a scholarship programme at area schools and donating to local charities.

Although the fast-casual chain Applebee's is the most popular restaurant in town, the cafes near the central square offer somewhat more elaborate fare, like seared ahi tuna and Tuscan chicken.

A walk by the courthouse will often reveal something a bit out of place - like an expensive European sports car or a gaggle of dark-suited people moving faster than the rest of the populace.

What has set tiny Marshall apart is the Eastern District of Texas court, located in a drab converted post office building, which has been home to more patent copyright lawsuits in recent years than anywhere else in the United States.

More than Northern California and its patent-happy Silicon Valley technology firms. More than Delaware, the state that - thanks to its business-friendly incorporation rules - hosts headquarters for a lion's share of major US companies.

In that courthouse one man, Judge Rodney Gilstrap, has presided over a parade of companies like Apple, Microsoft, TiVo, Toshiba and the aforementioned Samsung.

Sometimes companies like these are filing suits against competitors they feel are marketing products too similar to what they already offer. TiVo, for instance, obtained a $500m (£386m) settlement from Echostar over its use of television digital video recorders in a case that started in Marshall.

Sometimes it's more like David and Goliath, with a small company trying to enforce a patent against a corporate giant it alleges is profiting from an idea or process it came up with first..

In this tiny East Texas town, a unique legal ecosystem has been created - with lawyers well-versed in talking to local juries, a community that benefits from the attention and judges who have an outsized influence in a key area of the law compared to their peers.

There's nothing quite like it in the US - and it may not be around much longer.

On Monday the US Supreme Court ruled that patent-holders seeking legal redress for infringements will have to file suit against infringers in their place of incorporation. For most cases, that will not be anywhere near Marshall.

Where the action is

On a recent Wednesday afternoon in Marshall, the topic of discussion was the shape of a computer mouse cursor.

In a basement of the district courthouse Eric Buether, a lawyer from Dallas, tried to convince magistrate judge Roy Payne - Mr Gilstrap's legal deputy - that nearly 20 years ago his clients came up with the idea of a cursor that changes into a magnifying glass, prompting users to zoom in with a click on an advertised product on a company's website.

It's a common enough feature now, but back then Buether says transforming cursors were novel - and the US Patent Office, the federal agency that grants inventors rights over their creations, agreed. His clients have dozens of business deals with partners who pay royalties to incorporate the feature on their sites.

Two companies - retail chain Costco and the department store Saks Fifth Avenue - aren't playing ball, however, and their lawyers sit at a table across from Buether. They argue that the patent didn't cover magnifying glasses, plus signs or anything short of cursors that change into an actual representation of a product being sold.

Image caption The 2000 cursor patent that formed the basis of a recent case in Marshall

After the hearing - a preliminary step to define terms before the case can go to trial - Buether explained why his Florida-based client, Lexos Media, and hundreds of other companies each year chose to bring their patent cases to Marshall.

"This is where the action is," he says. "The judges here know the patent law, they move cases along in a predictable, reasonable schedule, and they don't let unscrupulous litigants get away with unscrupulous behaviour.

"Marshall wasn't chosen with a dart on a map," he adds.

A dart may not be behind Marshall's rise to legal prominence, but it was the beneficiary of a quirk of geography.

In the early 1990s, Dallas-based Texas Instruments - once a giant in the computing industry - had fallen on hard times. Although its sales were declining, it did have plenty of technological patents - used and unused - that it turned into cold, hard cash, whether through deals with other companies or by taking offenders to court.

The local federal court in Dallas was swamped by criminal cases, which meant getting a patent case to trial took years of waiting.

Texas Instruments turned to the next nearest federal jurisdiction, East Texas, and started filing cases there.

Over time, the East Texas courts became adept at handling patent lawsuits. Texas liability lawyers, who had seen their income dry up because of state legal reforms, went into the patent-law business. The local judges developed procedures to move the cases along quickly without the delays typical in some other courts.

Other patent-holders with legal grievances took notice and brought their cases to Texas, thanks to a rule that allowed companies to be sued in a federal court if their product is sold anywhere in its jurisdiction. If a store near Marshall sold an iPhone, Apple could be dragged before Judge Gilstrap.

Image copyright Reuters Image caption Samsung is among the more regular firms in Judge Gilstrap's court

Early on, the patent-holders won some high-profile decisions. More plaintiffs flocked to the court, and Marshall as patent-trial capital of the US was born.

Land of trolls

Marshall's fame also contained the seeds of its undoing, however. In the early 2000s, when the Eastern District first established its reputation as a prime location for patent cases, plaintiffs were winning higher percentages of their cases in Texas than anywhere else in the US.

Buether explains this was in part because, in the early days, good lawyers brought their best cases to Marshall.

Not-so-good lawyers with not-so-great cases followed. Though they didn't win as many cases as their predecessors, winning in court wasn't always the objective.

Marshall became a haven for what's called patent trolls - companies that buy up old or vague patents as a means to file multiple lawsuits. Their goal was to squeeze money out of businesses that decide it's easier to pay a small settlement and make a case go away rather than fight it out with high-priced lawyers.

Plaintiff's attorney Buether objects to the troll label, calling it a creation of big companies that want to vilify smaller companies with legitimate grievances.

"Thomas Edison was one of the biggest 'trolls' in the world," he says. "He had a thousand patents, enforced them and never practised them. IBM has thousands of patents that it doesn't practise, and nobody calls them a troll."

The Wal-mart lawyer

In those early sorting-out days litigants also found some success by catching the big companies flat-footed.

Unlike European courts, patent cases in the US - because they involve monetary damages - are decided by a jury of 12 citizens drawn from residents in a court's jurisdiction. In Judge Gilstrap's court, that meant the jury pool came from the roughly 170,000 residents from Marshall and its surrounding counties - a mix of oil-and-gas drilling patches, vast stretches of farmland, tiny towns and, in the west, the more distant suburbs of Dallas.

Plaintiff's lawyers knew how to make a case to these juries, while defence attorneys from the big cities didn't.

That's created an opportunity for lawyers like Michael Smith, a Marshall native who built his legal practice around patent defence trials.

"Plaintiffs would have experienced trial lawyers, and the defence firms would just have patent lawyers who never tried a case before," he explains. "They would get killed."

Smith's law firm office is in the same building where his grandfather once ran a stationery store. The pavement outside bears the marks where he scrawled his initials in the wet cement as a child. Smith knows Marshall, and he knows the people who have been called upon to pass judgement in the patent cases in which tens - even hundreds - of millions of dollars are often at stake.

Image caption The courthouse where patent cases are heard

"One thing I've observed with patent lawyers is they're so smart and they work in these big firms and they live in almost isolation from normal people like me, who go to the Wal-mart and eat at McDonald's," he says. "Patent lawyers talk too fast, and they use too many big words. They make it difficult for a lay jury to pick things up."

Now Smith's business may be about to dry up. He still thinks the Eastern District could find a way to keep some of the patent cases. Foreign companies and unincorporated entities weren't covered by the court's decision, he says. And a different portion of the federal patent venue law could come into play. For instance, parties could sue Best Buy, which has a "regular and established place of business" in Marshall and sells the Windows operating systems in its stores, instead of targeting Microsoft directly.

It'd be more complicated, he admits, but he says lawyers are "bright people who will figure a way to get the client around almost any obstacle".

And if they don't?

"Before there was intellectual property cases in the Eastern District, there were other types of cases," he says. "And if the judges stop being so busy with intellectual property, we'll go back to having oil and gas cases or product liability. There will always be cases for good lawyers."

A unanimous ruling

Although Marshall has been the focus of critics of the current patent-law system, the case that most likely ended the town's reign as the patent capital of the US had nothing to do with Texas. The petitioner in the Supreme Court case, TC Heartland, is a small company based in Indianapolis, Indiana, that manufactures "liquid water enhancers" - small bottles of flavouring that can be added to beverages.

It's a product also made by consumer giant Kraft Foods Group Brands, which holds several patents.

Kraft, noting that Heartland sold some of its product in Delaware, filed a lawsuit alleging patent infringement in a federal court there - a jurisdiction that also has a reputation for being plaintiff friendly.

Heartland's lawyers argued that they should stand trial in their local Indiana court.

"The people who designed the accused products want to sleep in their own beds," says James Dabney, the lawyer who represented Heartland before the Supreme Court. "Trying the case in Indiana costs much less. You don't have to pay for all that out-of-town travel and lodging."

Image caption James Dabney at the US Supreme Court hearing

The details of the case were complex - dealing with a 69-year-old federal patent law, a 60-year-old US Supreme Court case and a 27-year-old appellate court ruling that created the broad venue rules that have allowed courts like Marshall's to flourish.

The case boiled down to whether the Supreme Court justices would uphold the way the law has been interpreted for nearly three decades by the appellate court or reassert its ancient (by modern legal standards) earlier ruling. In a unanimous decision they took the latter course.

Small-town pride

Robin Richardson is a reporter at the Marshall News Messenger. She's had a front-row seat to some of the biggest patent cases of modern times.

"It's very interesting and entertaining to learn how these inventors came up with their products," she say, adding that she loves informing her readers about the backgrounds of the various companies that pass through the courtroom doors.

"Every time Google comes to trial, I hear about their story of how they started in someone's garage. I get to add that human aspect, in addition to the technical stuff."

Not everyone in Marshall has been thrilled with the attention. Stormy Nickerson, head of the Marshall Chamber of Commerce, complained that one national television crew painted what she thought was an unflattering picture of Marshall and its residents, who in her mind were portrayed as being unfit to try such complex legal cases.

"It's always nice to have a spotlight, but when the spotlight is misguided - when the spotlight is improperly presented to the community, it's a challenge because we're proud of where we come from and we're proud of the way we live our lives," she says.

In the coming years the pride of East Texas residents is likely to be demonstrated in relative anonymity. The local restaurants will probably lose some catering business and the hotels will have to rely more heavily on gamblers looking for a place to stay between trips to the nearby Shreveport casinos. The patent cases will go elsewhere - many may well end up in that Delaware court.

"Marshall was just fine before the patent cases showed up," Nickerson says. "It's going to be just fine after they go."