A Boolean function on n variables is q-resilient if for any subset of at most q variables, the function is very likely to be determined by a uniformly random assignment to the remaining n − q variables; in other words, no coalition of at most q variables has significant influence on the function. Resilient functions have been extensively studied with a variety of applications in cryptography, distributed computing, and pseudorandomness. The best known resilient function on n variables due to Ajtai and Linial [AL93] has the property that only sets of size Ω(n/(log 2 n)) can have influence bounded away from zero. However, the construction of Ajtai and Linial is by the probabilistic method and does not give an efficiently computable function.We construct an explicit monotone depth three almostbalanced Boolean function on n bits that is Ω(n/(log 2 n))-resilient matching the bounds of Ajtai and Linial. The best previous explicit constructions of Meka [Mek09] (which only gives a logarithmic depth function), and Chattopadhyay and Zuckerman [CZ15] were only (n 1−β )-resilient for any constant 0 < β < 1. Our construction and analysis are motivated by (and simplifies parts of) the recent breakthrough of [CZ15] giving explicit two-sources extractors for polylogarithmic min-entropy; a key ingredient in their result was the construction of explicit constant-depth resilient functions.An important ingredient in our construction is a new randomness-optimal oblivious sampler that preserves moment generating functions of sums of variables and could be useful elsewhere.