WASHINGTON — The Supreme Court ruled unanimously on Monday that farmers could not use Monsanto’s patented genetically altered soybeans to create new seeds without paying the company a fee.

The ruling has implications for many aspects of modern agriculture and for businesses based on vaccines, cell lines and software. But Justice Elena Kagan, writing for the court, emphasized that the decision was narrow.

“Our holding today is limited — addressing the situation before us, rather than every one involving a self-replicating product,” she wrote. “We recognize that such inventions are becoming ever more prevalent, complex and diverse. In another case, the article’s self-replication might occur outside the purchaser’s control. Or it might be a necessary but incidental step in using the item for another purpose.”

But Justice Kagan had little difficulty ruling that an Indiana farmer’s conduct in the case before the court, Bowman v. Monsanto Company, No. 11-796, had run afoul of patent law.