The connuence property of ground (i.e., variable-free) term rewrite systems (GTRS) is well-known to be decidable. This was proved independently in DTHL87,DHLT90] and in Oya87] using tree automata techniques and ground tree transducer techniques (originated from this problem), yielding EXPTIME decision procedures (PSPACE for strings). Since then, it has been a well-known longstanding open question whether this bound is optimal (see, e.g., RTA01]). Here we give a polynomial-time algorithm for deciding the connuence of GTRS, and hence as well for the particular case of suux-and preex string rewrite systems or Thue systems. We show that this bound is optimal for all these problems by proving PTIME-hardness for the string case. This result may have some impact as well on other areas of formal language theory and, in particular, on the theory of tree automata.