Traditional object-oriented programming languages can be difficult to use when working with ontologies, leading to the creation of domain-specific languages designed specifically for ontology processing. Prolog, with its logic-based, declarative semantics offers many advantages as a host programming language for querying and processing OWL2 ontologies, and even for building applications. In particular, the SWI-Prolog environment includes an RDF library and has been successfully used to develop full-blown AJAX semantic web applications. However, until now there has been a lack of any library providing direct and complete support for OWL2. We have developed Thea, a Prolog library that fills that need. Thea uses an RDF library for parsing and serializing ontologies, but the core model is independent of RDF and is based directly on the OWL2 functionalstyle syntax, allowing direct manipulation of axioms from within Prolog. Thea also offers additional capabilities including SWRL support...