The following version of the Tietze extension theorem is well-known to be provable in RCA_0. Let C be a closed subset of a complete separable metric space X, and let f be a continuous function from C to the interval [-1,1]. Then f extends to a continuous function g from all of X to [-1,1], where g(x) = f(x) for all x in C. However, in this formulation g need not preserve the supremum of f. That is, it may be that the supremum of |g(x)| for x in X is strictly greater than the supremum of |f(x)| for x in C. We show that the following version of the supremum-preserving Tietze extension theorem requires Pi^1_1-CA_0. Let C be a closed subset of a complete separable metric space X, and let f be a continuous function from C to [-1,1]. Then f extends to a continuous g from X to [-1,1], where g(x) = f(x) for all x in C and additionally for every x in X there is a y in C with |g(x)| <= |f(y)|. This is an unusual example of a statement about continuous functions requiring Pi^1_1-CA_0.