TITLE: How does Local Cohomology detect UFD?
QUESTION [13 upvotes]: I read that Grothendieck developed Local Cohomology to answer a question of Pierre Samuel about when certain type of rings are UFDs.
I know the basics of local cohomology but I have not seen a theorem which shows the connection between UFDs and Local Cohomology.
My Question: 

Could someone tell me about a result which shows the connection, in particular a theorem which detects whether a ring is a UFD using local cohomology?

Thanks.

REPLY [6 votes]: What you mentioned is about the Grothendieck's proof of Samuel's Conjecture: 

If $R$ is a local domain which is a complete intersection and such that $R_{\mathfrak p}$ is UFD for every prime ideal of height $\le 3$, then $R$ is UFD. 

See SGA 2, Corollaire 3.14, page 132. (Maybe the keyword here is parafactorial). But probably the best algebraic approach to Grothendieck's method can be found in this paper.