Medium access control (MAC) resolves contention among simultaneously transmitting wireless nodes so as to utilize the wireless medium efficiently while mitigating interference.To be implementable, the MAC algorithm is required to be totally distributed and simple. In this talk, we will present such a MAC algorithm that is optimal in terms of utilizing medium and thus bringing a long pursued quest (since 1970s) to an end. In this MAC, each node utilizes its local queue-size and recent contention history to make decisions. We will also discuss related issues in stochastic networks. The talk will be self-contained. It is based on joint work with Jinwoo Shin and Prasad Tetali.