The present invention relates to a novel pharmaceutical composition in solid form of a nonsteroidal anti-inflammatory and/or pharmaceutically acceptable salts thereof, consisting in a tablet comprising a modified delivery system in three phases, which are: a) a delayed-release core, characterized by being localized at the center of the composition b) an immediate-release underlayer, which is characterized by fully and/or partially covering the core and, c) an extended-release top layer, which is characterized by fully and/or partially covering the core. Said composition is orally administered and is used to treat mild to moderate pain caused by headache, myalgia, altralgia, eye pain, photophobia, burning feeling secondary to eye surgery, postoperative pain, neuropathic pain, swelling, among others.