Can I forbid the government from using my patented invention?
<p><em>(this is a purely hypothetical situation, for literary research)</em></p>

<p>I've filed a patent on a certain technology for facial recognition/analysis, and as the patent holder I want to use my exclusivity to ensure it's not used to harm anyone.  Unfortunately, the nature of the invented technique can be easily misused for what I believe are evil purposes.  Military, then law enforcement agencies, have begun connecting me with manufacturers who want to incorporate my technique into their software suites, to which I am firmly opposed.  Mind, the patent is still in review, so getting inquiries this soon strikes me as odd.</p>

<p>My question is, can I deny the military use of my invention should the patent be approved, and if not, are there any ways in which I can sabotage or otherwise render it difficult for them?  Perhaps by requesting an impractically large royalty or purposely presenting a subtly faulty implementation to their manufacturing firm?</p>

<p>Can you prevent the government from using your patent? The opposite is actually true.</p>

<p>If you patent something, and it is felt to be potentially of national security interest, then they can take your invention for the nation, produce it, and prevent you producing it or sharing the design indefinitely (though it will be reviewed annually). This has happened to about 5000 patents so far.</p>

<p><a href="https://www.wired.com/2013/04/gov-secrecy-orders-on-patents/" rel="noreferrer">https://www.wired.com/2013/04/gov-secrecy-orders-on-patents/</a></p>

<p>Even where it is not of national security interest, and the government (or its contractors!) is not using it directly as covered in user6726' answer, they can still take your patent under the equivalent of eminent domain... well, I'll quote from <a href="http://patentplaques-blog.com/eminent-domain-excercised-on-patents/" rel="noreferrer">http://patentplaques-blog.com/eminent-domain-excercised-on-patents/</a></p>

<blockquote>
  <p>During World War I, the military took all patents relevant to wireless
  technology and put them in a mandatory licensing pool. Anyone was then
  able to use the patents and the patent holders received royalties. The
  pooling of the patents led to innovations including the mass
  production of vacuum tubes and a national FM radio network.</p>
</blockquote>

<p>So, in short, the government can use your invention for its own purposes; it can prevent you from using it; and it can force you to give it to others.</p>

<p>They don't do this too often, but if you're working in an area that you think will be of especial interest to them, it's something to be aware of. In general, they will compensate you somewhat for your trouble, but not as much as the open market could have.</p>

<p>You cannot deny the federal government the right to use your patent, but you can sue them for "recovery of [your] reasonable and entire compensation for such use and manufacture", see <a href="https://www.law.cornell.edu/uscode/text/28/1498" rel="noreferrer">28 USC 1498</a>. Note that the statute refers to such use as being "without license of the owner thereof or lawful right to use or manufacture the same", that is, there is no lawful right to infringe on a patent, but recourse for infringement is highly limited. A suit against the government under §1498 is (see the summary in <a href="https://law.justia.com/cases/federal/appellate-courts/F2/702/1350/329424/" rel="noreferrer">Airborne Data v. US</a>, 702 F.2d 1350) on an eminent domain theory. It has been long established that the right under eminent domain is only constitutionally limited by the requirement for compensation, so there is no need to say "and you may not seek an injunction". Para (b) which was added later may have explicitly limited jurisdiction to the Court of Federal Claims. There has been inconsistency in the court's interpretation of the jurisdiction requirement (<a href="https://www.leagle.com/decision/19791557599f2d95811368" rel="noreferrer">Leeson v. US</a>, vs.
<a href="https://law.justia.com/cases/federal/appellate-courts/F2/917/544/350894/" rel="noreferrer">Manville  Sales  v.  Paramount</a>,  917  F.2d  544), though precedent has been that the Court of Claims has jurisdiction. Para (b) makes that explicit.</p>

<p>The <a href="http://www.wipo.int/treaties/en/text.jsp?file_id=288514" rel="noreferrer">Paris Convention for the Protection of Industrial Property</a> allows countries to issue compulsory licences when patent holders abuse their patent rights.  This specifically includes preventing the use of the invention or unduly limiting it's use.</p>

<blockquote>
  <p>(2) Each country of the Union shall have the right to take legislative
  measures providing for the grant of compulsory licenses to prevent the
  abuses which might result from the exercise of the exclusive rights
  conferred by the patent, for example, failure to work.</p>
  
  <p>...</p>
  
  <p>(4) A compulsory license may not be applied for on the ground of
  failure to work or insufficient working before the expiration of a
  period of four years from the date of filing of the patent application
  or three years from the date of the grant of the patent, whichever
  period expires last; it shall be refused if the patentee justifies his
  inaction by legitimate reasons. [...]</p>
</blockquote>

<p>"Work" in this context means producing or importing the invention.</p>

<p>While the US in particular has no working requirement for patents, user6726's answer shows it's not possible to stop the US government from using your patent. (As both US and foreign patent holders are denied this remedy, it doesn't violate the Paris Convention.) Other governments will either be able to rely on the working requirements or special national interest or security exceptions. Patents are supposed beneficial for countries, not weapons used to deny some technology, so every country is going to have some means to prevent this. Worst case they can always amend their laws if it's important enough.</p>

<p>Moreover, in the US injunctions for patent violations aren't automatic, so you may not be able to stop non-government entities from using your patent for "evil" purposes. For example, in <a href="https://scholar.google.ca/scholar_case?case=5359709651596296427&amp;q=MercExchange+v.+ebay&amp;hl=en&amp;as_sdt=2006&amp;as_vis=1" rel="noreferrer">MercExchange, LLc v. eBay, Inc</a> the courts refused to issue an injunction against eBay despite finding that eBay had wilfully infringed on MercExchange's patent. The District Court ultimately decided, after <a href="https://en.wikipedia.org/wiki/EBay_Inc._v._MercExchange,_L.L.C." rel="noreferrer">a Supreme Court appeal</a>, that monetary damages were a sufficient remedy. </p>

<p>Others have explained why you cannot use the patent system to prevent the Government using your invention.  However "patents" aren't the only way to protect Intellectual Property.  The other option is to keep it a trade secret, which you only reveal to people you trust, and under non-disclosure agreements.  </p>

<p>If it leaks to the government, you can sue the leakers - but not the government.</p>

<p><strong>if not, are there any ways in which I can sabotage or otherwise render it difficult for them</strong></p>

<p>There may be a parallel in this news topic -- <a href="https://www.google.fr/search?q=pharmaceutical+execution" rel="nofollow noreferrer">https://www.google.fr/search?q=pharmaceutical+execution</a> -- i.e. pharmaceutical manufacturers trying to prevent State governments from buying their product to use for executing convicts.</p>

<p>This has been happening for a long time, with mixed or partial success.</p>

<p>I suppose the companies license/sell their product for a limited purpose; and I guess (for what my guess is worth) that the government could but doesn't manufacture the product themselves.</p>

<p>The latest news (which may not be successful) is of companies suing for damage to their reputation.</p>

<p>Speaking as a lay person, and having had some experience in dealing with the government as an inventor, I felt compelled to add this: </p>

<p>As a <a href="http://wpressutexas.net/cs378h/index.php?title=CPBR_uses_the_phrase_%22as_a_practical_matter%22_several_times._How_would_you_interpret_this_if_you_were_the_FTC%3F_If_you_were_a_company%3F" rel="nofollow noreferrer">"practical matter"</a> you may find it difficult to gain any remedy, or any compensation from the government, regardless of the applicable law. Why? It's a matter of simple economics. </p>

<p>In the courts, you get all the justice you can afford. In practice that works out as follows: Unless your pockets are very deep, you are "out-gunned" by many orders of magnitude. The government has armies of legal staff and bureaucrats working on their side, while you do not. And the government does not actually bear the cost of pressing their view in the courts; they're spending OPM (other people's money), so the costs are irrelevant.</p>

united-states patents texas